The Chromium team is exploring the Rust and C++ interoperability
The Chrome team also started to experiment with Rust. In the recently published document on Chromium official website, “Rust and C++ interoperability” was raised as an unsolved challenge.
At this stage, Chrome engineers know very well that C++ is the important programming language and will still be “the reigning monarch in our codebase” for the foreseeable future. They believe that if you use Rust, you need to adapt it to C++, instead of letting C++ work with Rust. What the Chrome team is currently exploring is whether and how Rust can call C++ code.
From the current research results, the Chrome team has figured out several important ways to call C++ functions, including avoiding the use of “unsafe” keyword as much as possible, using libraries such as cxx to expand support, instantiating C++ objects, and safely passing ownership and many more. However, there are still many problems and difficulties to be solved.