Description
I'm using Arch Linux and my distribution provides a (usually) up-to-date version of rustc & cargo. In particular, I have a system-wide copy of the x86_64-unknown-linux-gnu
, placed in /usr/lib/rustlib
. Please note that rustup is not used here at all.
Sometimes I need to cross-compile to other targets, such as x86_64-pc-windows-gnu
or wasm32-wasi
. This has issues, for instance #49078. It also results in unnecessary duplication.
Currently it's possible to build a Rust cross compiler manually, such as the rust-mingw AUR package. Still, this requires building the whole LLVM, compiler, cargo, which takes a lot of time and this is basically emulation of rustup without rustup (there are separate copies of rustc, cargo, etc.)
Is it possible to only compile the required bits, so that one can just supplement the existing system-wide instance of Rust with new target? We can assume that their version will match.
For reference, the rustup steps for wasm32-wasi
are:
rustup target add wasm32-wasi
for x86_64-pc-windows-gnu
:
rustup install stable-x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu
Activity