Sign inSign up

lordmulder/rust-xbuild

By lordmulder

Updated 9 days ago

Docker container with Rust and Debian cross-build utilities.

Image
0

4.6K

lordmulder/rust-xbuild repository overview

Docker container with Rust and Debian cross-build utilities.

Supported targets

Linux targets:

  • aarch64-unknown-linux-musl
  • i586-unknown-linux-musl
  • i686-unknown-linux-musl
  • powerpc64le-unknown-linux-musl
  • riscv64gc-unknown-linux-musl
  • x86_64-unknown-linux-musl

FreeBSD targets:

  • x86_64-unknown-freebsd

NetBSD targets:

  • x86_64-unknown-netbsd

The "xbuild" script

The cargo-xbuild helper script is provided to make cross-building slightly easier 😅

Just run the following command from your Rust project directory:

cargo xbuild --release

Note: This script is supposed to be executed from within the provided Docker container!

By default, the script will build all supported targets.

The environment variable RUST_XBUILD_TARGET can be used to specify the target(s) to build.

Docker integration

To build your project with cargo-xbuild directly from the host, invoke Docker like this:

docker run --rm -v /path/to/source:/workspace -w /workspace \
lordmulder/rust-xbuild cargo xbuild --release

Please see do-xbuild.sh in the "example" directory for details!

GitHub repository

https://github.com/lordmulder/rust-xbuild/blob/master/Dockerfile

Tag summary

Content type

Image

Digest

sha256:7f884567d

Size

1.7 GB

Last updated

9 days ago

docker pull lordmulder/rust-xbuild