$ cargo test -target "$ARCH-pc-windows-gnu" $ cargo build -release -target "$ARCH-pc-windows-gnu" Then you can use Cargo like this: $ # Build Check the list of files for the mingw-w64 package(s) (GCC and binutils) in your distribution. Note: the exact paths can vary based on your distribution. If you're using Cargo, you can tell Cargo where to look for ar and the linker by adding this to ~/.cargo/config (where $ARCH is the architecture you use):
However, according to Arch Linux's wiki page on Rust, you could copy the compiled libraries from the Windows packages in the download directory (note that there are i686 and x86-64 packages) in the appropriate place on your system (in /usr/lib/rustlib or /usr/local/lib/rustlib, depending on where Rust is installed), install mingw-w64-gcc and Wine and you should be able to cross-compile. The Rust distribution only provides compiled libraries for the host system.