Any known examples in open source products doing the following pattern with Rust:
1. You have a Rust crate that you compile to you compile as usual host-to-host.
2. You have a
build.rs that spawns cargo to a directory with rust-toolchain.xml defining nightly target.
3. You pass options (e.g. --target) for cargo to compile for a different target than the host.
Obviously Command is used to create the process together with current_directory() to change the directory to the one with Cargo.toml and rust-toolchain.xml. It is not a sub-crate per se topologically but a disjoint crate.
In Linux and macOS this can be made to work. With Windows cargo is acting like --target etc. options did not exist at all and ignores rust-toolchain.xml.
Any ideas how to make this type of pattern work?
#rust #rustlang #cargo #windows #riscv