Hi there.

I’ve published new revisions of multirust and rustup.sh that enable installation of additional standard libraries for cross compilation.

Note that because this feature depends on server-side metadata generated by the Rust release process, it works only for the nightly channel until the next train passes.

multirust adds the multirust list-available-targets [toolchain] and multirust add-target [toolchain] [target] . These work like so:

brian@ip-10-235-20-183:~/dev/multirust⟫ multirust update nightly multirust: installing toolchain 'nightly' rustup: gpg available. signatures will be verified rustup: downloading manifest for 'nightly' rustup: downloading toolchain for 'nightly' ######################################################################## 100.0% gpg: Signature made Tue 08 Mar 2016 11:42:25 AM UTC using RSA key ID 7B3B09DC gpg: Good signature from "Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC rustup: installing toolchain for 'nightly' rustup: extracting installer install: creating uninstall script at /home/brian/.multirust/toolchains/nightly/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'rust-std-x86_64-unknown-linux-gnu' install: installing component 'rust-docs' install: installing component 'cargo' Rust is ready to roll. brian@ip-10-235-20-183:~/dev/multirust⟫ multirust list-available-targets nightly aarch64-apple-ios aarch64-unknown-linux-gnu arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf armv7-apple-ios armv7-unknown-linux-gnueabihf armv7s-apple-ios i386-apple-ios i686-apple-darwin i686-pc-windows-gnu i686-pc-windows-msvc i686-unknown-linux-gnu mips-unknown-linux-gnu mipsel-unknown-linux-gnu powerpc-unknown-linux-gnu powerpc64-unknown-linux-gnu powerpc64le-unknown-linux-gnu x86_64-apple-darwin x86_64-apple-ios x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-rumprun-netbsd x86_64-unknown-linux-gnu x86_64-unknown-linux-musl brian@ip-10-235-20-183:~/dev/multirust⟫ multirust add-target nightly arm-linux-androideabi rustup: downloading extra component from https://static.rust-lang.org/dist/2016-03-08/rust-std-nightly-arm-linux-androideabi.tar.gz ######################################################################## 100.0% gpg: Signature made Tue 08 Mar 2016 11:21:09 AM UTC using RSA key ID 7B3B09DC gpg: Good signature from "Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 108F 6620 5EAE B0AA A8DD 5E1C 85AB 96E6 FA1B E5FE Subkey fingerprint: C134 66B7 E169 A085 1886 3216 5CB4 A934 7B3B 09DC rustup: installing extra component from /home/brian/.multirust/rustup/dl/b7da00c49f477349dcc5/rust-std-nightly-arm-linux-androideabi.tar.gz rustup: extracting installer install: creating uninstall script at /home/brian/.multirust/toolchains/nightly/lib/rustlib/uninstall.sh install: installing component 'rust-std-arm-linux-androideabi' install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error std is standing at the ready.

At which point you can build with cargo build --target arm-unknown-androideabi . You will still need whatever native toolchain components (like gcc) are required for cross-compilation.

rustup.sh gets three new arguments: --list-available-targets , --add-target , and --with-target . The first two operate similarly to multirust while --with-target can install both the compiler and std from a single command.

I’ve barely tested this live, so give it a shot and see if it works for you.

The future of multirust is rustup.rs

This is the last major update I plan to make to multirust the shell script. My focus now is on multirust-rs, which is going to be rebranded as rustup.rs because ‘rustup’ is more fun to say and type than ‘multirust’. rustup.rs will eventually be the official way to install Rust. Note that I don’t recommend switching to multirust-rs yet, but it should be ready within weeks or days.

rustup.rs is written in Rust, so is much more robust and easier to maintain, and it works correctly on Windows. Now that we’ve got the server-side manifest data working we’ll be able to add source installation and installation of e.g. debug-compiled std.

rustup.rs is also going to be responsible for installing whatever NDK components are needed for cross-compilation, deployment and testing.

The immediate plans for rustup.rs are here.