Rust/C++ Interop: Carcinization or Intelligent Design?
summary
Claim: general-purpose high‑fidelity interop has not yet been achieved. Survey covers C as the duct‑tape route and tools: bindgen/cbindgen (source‑gen C FFI, limited types), cxx requires pinning and boxes everything — no pass‑by‑value, Zengar (IDL with size/alignment so you can pass by value), and Cubit (deep Clang integration aiming for full C++ surface; Google backing). Notes ABI surprises: tail padding, non‑relocatable C++ objects, C++26 “trivial relocatable” fixes, and a MoveIt crate workaround; compiler metadata is essential for performant boundaries.
AI-written summary · about
chapters (15)
- 0:00Rust/C++ interop challenges
- 7:18C as interop lingua franca
- 11:40CFFI and FFI limitations
- 16:37CXX interop solution
- 19:29Zengar layout-aware interop
- 23:20Cubit compiler-integrated interop
- 28:42Why interop remains difficult
- 33:45API stability in interop
- 39:05Resilience boundaries for performance
- 39:27Tail padding pitfalls
- 44:51C++26 trivial relocation
- 50:12Compiler integration needs
- 53:18Industry interop standardization
- 57:14Interop resources and future
- 57:59Q&A
related talks
40m"Fine-Grained C++ Interop"
37mDuck-Tape Chronicles: Rust/C++ Interop
01h 11mDuck-Tape Chronicles - Rust C++ Interop
25mRust and C++
52mBuilding Bridges: C++ Interop, Foreign Function Interfaces & ABI
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
42mPanel: Rust and C++ can work together!
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
