Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit 0b45473

Browse files
committed
Added bindgen where necessary, and set up crosscompiling rust targets.
1 parent fb89848 commit 0b45473

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- `naev-steamruntime` (Used for testing linux steam builds in the steamruntime (sniper) environment with extra dependencies installed.)
88
- `naev-windows` (Used to cross compile for Windows.)
99

10+
### v1.11.1
11+
- Added bindgen where necessary, and set up crosscompiling rust targets
12+
1013
### v1.11.0
1114
- 'naev-macos`, `naev-steamruntime`, `naev-release`, `naev-docs`, `naev-windows`: Added rust support
1215

naev-macos/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ENV OSXCROSS_MP_INC "1"
9999
ENV APPIMAGE_EXTRACT_AND_RUN 1
100100

101101
# Install build tools.
102-
RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install cargo clang cmake gettext genisoimage git llvm meson ninja-build python3-pip python3-pyyaml rust unzip tar texinfo xz zlib zip && \
102+
RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install bindgen clang cmake gettext genisoimage git llvm meson ninja-build python3-pip python3-pyyaml rustup unzip tar texinfo xz zlib zip && \
103103
microdnf clean all && \
104104
# Need Meson >=1.2.0 for fancy wrap files.
105105
python3 -m pip install meson --upgrade && \
@@ -113,5 +113,10 @@ RUN microdnf --nodocs --setopt=install_weak_deps=0 -y install cargo clang cmake
113113
rmdir /opt && ln -s /usr/lib/osxcross/macports/pkgs/opt /opt && \
114114
# Set WORKDIR when you spin up the image.
115115
mkdir -p /tmp/naevBuild
116+
117+
# Install cross compilation rust toolchain
118+
RUN rustup-init -y -t x86_64-apple-darwin -t aarch64-apple-darwin --default-toolchain stable
119+
ENV PATH=/root/.cargo/bin:$PATH
120+
116121
WORKDIR /tmp/naevBuild
117122
CMD [ "/usr/bin/macports-configure.sh", "/bin/bash" ]

naev-steamruntime/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN curl -L -O https://github.com/adah1972/libunibreak/releases/download/libunib
3030
RUN apt-get -y install \
3131
autoconf \
3232
automake \
33+
bindgen \
3334
build-essential \
3435
cmake \
3536
git-core \
@@ -127,7 +128,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip \
127128
command -v ffmpeg && \
128129
ffmpeg -version
129130

130-
131131
# Install Rust
132132
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y
133133
ENV PATH "$PATH:/root/.cargo/bin"

naev-windows/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ WORKDIR /tmp
1313
COPY _copr:copr.fedorainfracloud.org:jackgreiner:ucrt64-libraries.repo /etc/yum.repos.d
1414

1515
RUN microdnf update -y && \
16-
microdnf --nodocs --setopt=install_weak_deps=0 -y install cargo gcc gettext git meson ninja-build python3-pyyaml rust tar texinfo xz unzip zip \
16+
microdnf --nodocs --setopt=install_weak_deps=0 -y install bindgen gcc gettext git meson ninja-build python3-pyyaml rustup tar texinfo xz unzip zip \
1717
# Install mingw64 packages
1818
ucrt64-gcc ucrt64-gcc-c++ ucrt64-dlfcn ucrt64-enet ucrt64-freetype ucrt64-libvorbis ucrt64-libxml2 ucrt64-libtiff \
1919
ucrt64-openal-soft ucrt64-SDL2 ucrt64-SDL2_image ucrt64-libpng mingw32-nsis ucrt64-pcre2 ucrt64-physfs && \
@@ -23,6 +23,10 @@ RUN microdnf update -y && \
2323
unzip OpenBLAS-0.3.28-x64-64.zip -d /usr/x86_64-w64-mingw32ucrt/sys-root/mingw && \
2424
rm -rf OpenBLAS-0.3.28-x64-64.zip
2525

26+
# Install cross compilation rust toolchain
27+
RUN rustup-init -y -t x86_64-pc-windows-gnu --default-toolchain stable
28+
ENV PATH=/root/.cargo/bin:$PATH
29+
2630
# Force appimages to run in extract mode since FUSE is not available
2731
ENV APPIMAGE_EXTRACT_AND_RUN 1
2832

0 commit comments

Comments
 (0)