3 ms·
> Now, we add Rust to the list. You can write that library in Rust and it can be used by anyone, too. That's because there is no GC or other extraneous code, an
by colejohnson66 7y ago
> Now, we add Rust to the list. You can write that library in Rust and it can be used by anyone, too. That's because there is no GC or other extraneous code, and because you can make structures with specifically-defined layout in memory.
Genuine question: Can you link a Rust binary with a C/C++ binary?
- steveklabnik 7y agoAbsolutely.
- baq 7y agonotably firefox has a few modules implemented in rust.
- mlindner 7y agoYou can link a Rust library to a C/C++ binary and you can link a C/C++ library to a Rust binary. https://doc.rust-lang.org/nomicon/ffi.html https://doc.rust-lang.org/nomicon/ffi.html Notably you need to use the C ABI to call things from C++ as Rust FFI doesn't support C++ directly.