You declare a high-level description of the language boundaries eg in "extern c++" or "extern rust" within the rust, then CXX uses static analysis of the types and function signatures to protect both Rust's and C++'s invariants. Then it "uses a pair of code generators to implement the boundary efficiently on both sides together with any necessary static assertions for later in the build process to verify correctness." As far as I have seen. python-libbitcoin and libbitcoin-c had to both be maintained as you pointed out. At least this way, the low-level FFI in C can be automated