Skip to content
Docker images for Rust projects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aarch64-unknown-linux-gnu
arm-linux-androideabi
arm-unknown-linux-gnueabi
arm-unknown-linux-gnueabihf
armv7-unknown-linux-gnueabihf
i686-pc-windows-gnu
i686-unknown-linux-gnu
mips-unknown-linux-gnu
mipsel-unknown-linux-gnu
powerpc-unknown-linux-gnu
powerpc64-unknown-linux-gnu
powerpc64le-unknown-linux-gnu
prebuilt
sparcv9-sun-solaris
support
x86_64-pc-windows-gnu
x86_64-rumprun-netbsd
x86_64-sun-solaris
x86_64-unknown-freebsd
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
x86_64-unknown-netbsd
.travis.yml
LICENSE-APACHE
LICENSE-MIT
README.md
docker-test.sh
test.sh

README.md

Port of Rust

Build Status

This repo contains a collection of docker containers intended for compiling Rust code for various platforms. Each container contains what should be the bare minimum for compiling Rust code on the target platform, including:

  • A Rust compiler
  • A Rust standard library for the target platform
  • A C compiler/linker for the target platform

The tests for this repository run a smoke "build a cargo project" for each platform, so at least "Hello, World!" should be guaranteed to work!

Building an image

First, figure out the target you'd like. Let's say that's arm-linux-androideabi. Next, build the docker container like so:

docker build -f arm-linux-androideabi/Dockerfile .

And then you're ready to go!

Platform Support

Most of the platforms here are currently untested, which means that your mileage may vary when using them. Some concerns to keep in mind when cross compiling are:

  • For Linux targets, the glibc version on the machine you run a binary on must be at least the glibc version in each docker container. Currently not much effort is done to ensure these glibc versions are "old", but patches are welcome!
  • For most other targets, they're compiled against "some version" of the OS being run on, and it may not always be the case that this version is old enough for you to run on your target platform. For example the Android container has an API level 21 toolchain, where the binaries of the standard library currently support API level 18.
  • Various codegen options for cross-compiled linux architectures may not always work out. Patches to the standard library and this repository are of course welcome!

If those are all taken care of, however, then the cross compilation experience should be relatively smooth!

License

These docker images are primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, and LICENSE-MIT for details.

You can’t perform that action at this time.