3 ms·
> The build system is also confusing but I guess that's partly just because it's a really complicated thing to do. > Still, beats doing it all by hand! Still
by rvz 6y ago
> The build system is also confusing but I guess that's partly just because it's a really complicated thing to do.
> Still, beats doing it all by hand!
Still a pain to maintain, tweak and update your Rust project and cargo configs with your C++ code alongside a third party crate maintained by one person in the project. D lang is probably the only language that has this built into into the language.
I'd rather go for a first party library with this support or C++ interop support built into the language like D.
- mhh__ 6y agoD can even catch C++ exceptions on Linux (haven't tried it on Windows yet)
- lalaithion 6y agohttps://cxx.rs/binding/result.html https://cxx.rs/binding/result.html You can also catch C++ exceptions (by turning them into the idiomatic Result type in Rust) using cxx.
- mhh__ 6y agoThat's cheating! https://d.godbolt.org/z/Ed65xMdj1 https://d.godbolt.org/z/Ed65xMdj1
- vardump 6y agoMight otherwise be a great idea (never tried D), but not very useful if you have to integrate Rust with C++.