C++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
summary
Shows concrete bridges: implements manual bindings with C FFI (create/delete pair, opaque Rust type stored in C++ unique_ptr) and contrasts that with CXX code generation; wires Cargo and CMake via corrosion and uses build.rs plus libclang to generate bindings; resolves transitive C++ deps with Conan and produces working CMake install targets. Demonstrates repr(C) structs for fixed-size arrays, copy-cost observations on 4x4 matrices, and a repeatable build workflow that actually links and runs.
AI-written summary · about
chapters (8)
- 0:00C++/Rust interop intro
- 2:29Manual interop basics
- 9:58Domain types bridging
- 19:21Manual interop summary
- 21:07Rust in CMake builds
- 32:56Calling C++ from Rust
- 44:37Conclusion & tools
- 45:42Q&A
related talks
25mRust and C++
52mBuilding Bridges: C++ Interop, Foreign Function Interfaces & ABI
01h 29mA Friendly Introduction to Rust for C++ Developers
31mEmbedding Rust in C/C++
45mC++ Rust and Qt Easier than you think
01h 11mDuck-Tape Chronicles - Rust C++ Interop
01h 22mRust for the C++ Programmer
01h 02mRust/C++ Interop: Carcinization or Intelligent Design?
