3 ms·
> Rust should integrate easily with C++ code The day that Rust manages to have always up to date Qt bindings that do not force you to make compromises compared
by cm3 10y ago
> Rust should integrate easily with C++ code
The day that Rust manages to have always up to date Qt bindings that do not force you to make compromises compared to the C++ API, I think the C++ support will be at a comfortable level. Right now there are fresh efforts in the Rust and Haskell camps to solve this cleanly in a modern way. It would certainly help if the consumption of C++ APIs via llvm (which is used a lot byt Rust) was made a first class feature like you can import and export C APIs. Exporting C++ classes is a whole different story and may not map in any reasonable way to Rust modules or crates.
- bch 10y agoI'm ignorant of Rusts ABI/requirements, but can the C ABI be used as a lingua franca, or are there necessary facilities that are unsupportable there?
- dikaiosune 10y agoFFI through a C ABI is how Rust <-> C++ currently works, but IIUC it's quite limiting when one might want to make use of C++ specific features. Especially important when a given C++ project doesn't have a fully-featured C API, or any C API at all.
- whyever 10y agoThere is no general C++ ABI, the ABI depends on the compiler and the standard library.