HACKER Q&A
📣 _448

How do you interop between Rust and C++?


How do you interop Rust code with third-party C++ libraries and source code? What are the challenges, and how to mitigate them?


  👤 tronical Accepted Answer ✓
You might find this article helpful from my colleague Tobias: https://slint-ui.com/blog/rust-and-cpp.html

👤 sylware
I write plain and simple C and assembly, does work with the rust/c++ tantrums of the other devs. Those are very egoistical as the other way around is not true.

It comes down to binary interface (~ABI), and you better keep it stupid and simple. It means the c++ or rust devs must care to design and implement an ABI level interface.