Rust and C++
summary
Shows concrete interoperability patterns and real tradeoffs: use bindgen or cbindgen for header-driven bindings, use the cxx crate for zero-copy, idiomatic Rust↔C++ bridges, and use the cpp crate macro to inline C++ code that generates its own bindings. Demonstrates build recipes: Cargo build.rs with the cc or cmake crates, and CMake integration via Corrosion to drive Cargo. Claims nothing is fully automatic and documents the manual wrappers and safety caveats encountered.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:25History
- 1:59About me
- 2:28Why C
- 4:03Code Level Integration
- 7:43Binding
- 14:38No Binding
- 14:56CPP Crate
- 16:45Approaches
- 18:49Build System Integration
- 20:01Cargo
- 20:35Build RS
- 22:12Integration
- 24:12Outro
related talks
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
08mLightning Talk: C++ and Rust Bindings - Mixing It Best With CMake
59mRust for C++ developers - What you need to know to get rolling with crates
52mBuilding Bridges: C++ Interop, Foreign Function Interfaces & ABI
35mÀ la carte: mix and match C, Rust and Go!
01h 22mRust for the C++ Programmer
31mEmbedding Rust in C/C++
01h 29mA Friendly Introduction to Rust for C++ Developers
