Zet - How do I build a rust binary for another target using zigbuild?
How do I build a rust binary for another target using zigbuild?
Install zigbuild if needed https://github.com/rust-cross/cargo-zigbuild
cargo zigbuild --target x86_64-unknown-linux-musl
Other rust targets https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-1-with-host-tools
Adding rust target using rustup
rustup target add i686-unknown-linux-musl
the musl version gets around the missing GLIBC version issue
Due to limitations of the C ABI, floating-point support on i686 targets is non-compliant: floating-point return values are passed via an x87 register, so NaN payload bits can be lost. Functions with the default Rust ABI are not affected. See issue 115567.
#rust #zigbuild