A docker image to cross compile Rust for FreeBSD, currently only x86_64 architecture is supported.
1.5K
This Docker image is used to cross compile Rust for FreeBSD, currently only x86_64 architecture is supported.
And the rust-toolchain.toml in your project directory will be respected to install the Rust version specified.
In the directory containing your project run:
docker container run --rm --volume "$(pwd)":/src \
--init --tty --user "$(id --user):$(id --group)" \
"hustcer/rust-cross-freebsd:latest" \
build --release --target x86_64-unknown-freebsd
This example works out of the box in a run step with the ubuntu runner.
docker container run --rm
--volume ${{ github.workspace }}:/src
--user $(id --user):$(id --group)
hustcer/rust-cross-freebsd:latest build --release --target x86_64-unknown-freebsd
FROM hustcer/rust-cross-freebsd:latest
USER root
RUN apt-get update \
&& apt-get install --no-install-recommends -y libssl-dev
USER rust
ENTRYPOINT ["/bin/sh", "-c"]
Content type
Image
Digest
sha256:d43d1bfbb…
Size
722.3 MB
Last updated
3 months ago
docker pull hustcer/rust-cross-freebsd