While an all-Rust approach might work for minimal bare-metal embedded systems or fully isolated microservices, it doesn’t instantly retire the vast amount of existing code in most companies’ code bases. Most developers realize that a more nuanced stance is necessary for the foreseeable future, one that harmoniously blends Rust with existing C and C++ libraries.
Thankfully, this pragmatic “Rust in the Real World” approach has been part of Rust’s heritage since its inception within Mozilla Firefox. So, in light of this historical combination of Rust and C++, what have we learned that can help address integration challenges today? To find out, we consulted Rust experts and practitioners within our engineering department as well as Ferrous Systems, an internationally recognized Rust consultancy. Here, we present guidelines and advice on combining Rust and C/C++ across a variety of scenarios. Read more...