4 ms·
This is where I stand right now, too. I recently published an overview of Rust <-> C++ interoperability[0], and cxx is the most effective tool available IME, bu
by dureuill 5y ago
This is where I stand right now, too. I recently published an overview of Rust <-> C++ interoperability[0], and cxx is the most effective tool available IME, but OTOH even cxx is not there yet (mainly missing bindings for Option and iterators). However the space, especially with autocxx, is evolving rapidly.
[0] https://blog.tetrane.com/2022/Rust-Cxx-interop.html https://blog.tetrane.com/2022/Rust-Cxx-interop.html
- virtualritz 5y agoI think you missed `cppmm`[1] which IMHO is one of the most promising projects in that space. https://github.com/vfx-rs/cppmm https://github.com/vfx-rs/cppmm
- dureuill 5y agoInteresting! You're correct that it was not on my radar, don't really know why. Looking at the repository, it looks like the output is a bunch of extern "C" functions, though. Does that mean that one must call eg destructors by hand? How are C++ exceptions handled? Is this sound in the presence of non-relocatable types (eg std::string)? If so, how? Also, this only handles the C++ -> Rust direction, right? Anyway, thank you for letting me know of this project!