Blog

From C++ to Rust: A Step Forward in Efficiency for vSomeIP

July 2, 2025

A modern rewrite of the vSomeIP logging module in Rust enhances both performance and safety, demonstrating how Rust and C++ can effectively coexist in safety-critical automotive systems.

Critical Software Image

As the automotive software landscape evolves, so does the need for safer and more efficient code. At Critical Software, we’ve been exploring how modern languages like Rust can complement and enhance existing C++ systems—particularly in performance-critical environments. 


One of our recent efforts focused on vSomeIP (Scalable service-Oriented middlewarE over IP), the open-source middleware maintained under the  COVESA (Connected Vehicle Systems Alliance) consortium and widely adopted by OEMs (Original Equipment Manufacturer). Originally developed by the BMW Group, vSomeIP is now jointly maintained by BMW and Critical Software. 


Specifically, we looked at the logging module, which plays a key role in system observability by outputting messages in the DLT (Diagnostic Log & Trace) format. 


While DLT ensures traceability and integrity—both essential in automotive systems—it also introduces performance overhead. Combined with the original C++ implementation’s reliance on mutexes and thread locking, this created a clear opportunity for improvement. 


We explored two paths: a refactor in modern C++, and a full rewrite of the logging module in Rust. Both approaches preserved the public API and logging semantics, but Rust’s safe concurrency model and lock-free channels allowed us to eliminate some key bottlenecks. 


The outcome? A more efficient logging pipeline that integrates seamlessly with the existing C++ codebase, while also improving memory safety and reducing thread contention. 


This paper demonstrates that Rust can be introduced incrementally into C++ projects, even in safety-critical domains like automotive software. With the right tools and a clear migration strategy, it’s possible to modernize legacy systems without starting from scratch. 


At Critical Software, we support organisations looking to modernise their software stacks without compromising safety, performance, or compatibility. With decades of experience in delivering high-assurance systems, we help our clients navigate complex technical transitions, adopt emerging technologies, and build solutions that meet the rigorous demands of their industries.  


For more insight into these standards and their importance, read our free white paper