How we interfaced single-threaded C++ with multi-threaded Rust
Summary
This article explains how to safely interface single-threaded C++ with multi-threaded Rust using the cxx crate, including a deterministic testing setup and a fuzzer. It covers issues with passing C++ objects across threads, introduces ownership wrappers, and presents main-thread safety tokens and SYNC/UNSYNC concepts to ensure correct cross-language usage. The result is a Rust-centric approach that improves safety and production-readiness and hints at formal proofs in a follow-up.