[+] Rust builder?
This commit is contained in:
parent
a0db219ba3
commit
cafa3ff752
4 changed files with 37 additions and 2 deletions
16
tools/rust-builder/general/Dockerfile
Normal file
16
tools/rust-builder/general/Dockerfile
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
FROM debian:10-slim
|
||||
|
||||
# Install Rust building environment
|
||||
RUN apt update && apt install -y curl build-essential gcc libssl-dev bash musl-tools mingw-w64
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
RUN source $HOME/.cargo/env
|
||||
|
||||
# Add toolchains for building for gnu[x86_64, aarch64, armv7l], musl[x86_64], and windows[x86_64, aarch64]
|
||||
RUN rustup target add \
|
||||
x86_64-unknown-linux-gnu \
|
||||
aarch64-unknown-linux-gnu \
|
||||
armv7-unknown-linux-gnueabihf \
|
||||
x86_64-unknown-linux-musl \
|
||||
x86_64-pc-windows-gnu \
|
||||
|
||||
WORKDIR /app
|
||||
8
tools/rust-builder/general/build.sh
Normal file
8
tools/rust-builder/general/build.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Build for platforms
|
||||
cargo build --release --target x86_64-unknown-linux-gnu
|
||||
cargo build --release --target aarch64-unknown-linux-gnu
|
||||
cargo build --release --target armv7-unknown-linux-gnueabihf
|
||||
cargo build --release --target x86_64-unknown-linux-musl
|
||||
cargo build --release --target x86_64-pc-windows-gnu
|
||||
Loading…
Add table
Add a link
Reference in a new issue