> You use `rustc` to output LLVM IR (with --emit-llvm) and then compile with `clang -flto -O3 foo.cc foo.bc` (you need a version close to Rust's LLVM, 3.3 won't understand the readnone/readonly parameter attributes). If you're calling the Rust functions from C++ or the C++ functions from Rust you do need to mark them as extern "C". It means you can have inlining and whole program optimization between Rust and C/C++ though.
This sounds absolutely fascinating. I'd love to see someone write up a blog post with example code.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
