[rust-dev] (FFI) Compile a dylib to x86 from a x86_64 machine and rust toolchain

2014-12-28 Thread Alfredo Di Napoli
Hello Rustacean, I’ll go straight to the point: I’m building a small FFI library which needs to be called from a C++ x86 project. I cannot change the arch of the latter (it’s Doom3, and relies on x86 arch entirely). Thus linker reject my Rust library as “file was built for x86_64 which is not the

Re: [rust-dev] (FFI) Compile a dylib to x86 from a x86_64 machine and rust toolchain

2014-12-28 Thread Corey Richardson
You need at least a 32-bit stdlib, but you can build with `cargo build --target i686-unknown-linux-gnu` and it will Just Work assuming you have the proper libs in $PREFIX/lib/rustlib/i686-unknown-linux-gnu. http://doc.rust-lang.org/src/rustc_back/target/mod.rs.html#330 has a list of the built-in

Re: [rust-dev] (FFI) Compile a dylib to x86 from a x86_64 machine and rust toolchain

2014-12-28 Thread Alfredo Di Napoli
Thanks Corey, I will have a look into this ;) Alfredo On Sunday, 28 December 2014, Corey Richardson co...@octayn.net wrote: You need at least a 32-bit stdlib, but you can build with `cargo build --target i686-unknown-linux-gnu` and it will Just Work assuming you have the proper libs in