C++ Migration Strategies
summary
Practical migration patterns focus on concrete tools and tradeoffs: use cxx to generate safe bindings and cxx-qt for Qt UIs, or drive Rust from CMake with corrosion; unidirectional options include uniffi and diplomat. Automatic translators like c2rust produce mostly unsafe Rust and need human rewrites. Best practice is to refactor into clear API/process boundaries, wrap C++ behind a tested surface, port behind unit tests, then swap implementations. Watch out for incomplete crates, version dependency hell, and mismatches around templates and OO APIs.
AI-written summary · about
chapters (10)
- 0:00Introduction and approach
- 2:37Low-level C FFI integration
- 5:16Bridging with cxx and Qt
- 8:38Unidirectional integrations
- 10:06Build system considerations
- 12:38Architectural patterns
- 18:27Systematic migration recipes
- 21:50Challenges and limitations
- 28:37Community and culture
- 31:55Q&A and final thoughts
related talks
25mRust and C++
45mC++ Rust and Qt Easier than you think
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
01h 29mC++ Should Be C++
28mC2Rust: Migrating Legacy Code to Rust
42mPanel: Rust and C++ can work together!
19mCpp2Rust: Automatic Translation of C++ to Safe Rust
