Programming: Why these developers love Rust in their cars

Software engineers at automaker Volvo have elaborated on why they’re fans of the Rust programming language, claiming that Rust is actually “good for your car.”

Everyone seems to love Rust, from Microsoft’s Windows and Azure teams to Linux kernel maintainers, Amazon Web Services, Meta, the Android Open Source Project, and more. And now it’s time to add Volvo’s software engineers to that list.

Julius Gustavsson, technical expert and systems architect at Volvo Cars Corporation, explains “why Rust is actually good for your car” in an interview on Medium with another Volvo software engineer, Johannes Foufas.

Rust is a relatively young language that helps developers avoid memory-related errors that C and C++ do not automatically, hence Rust’s growing popularity in systems programming. Memory-related errors are the most common serious security issues, according to Microsoft and Google’s Chrome team.

The potential of rust

Volvo, along with the automotive industry in general, is turning to “software-defined cars” to customize, differentiate and improve vehicles after they leave the factory.

The main advantages that Julius Gustavsson sees in Rust are: not having to think about race relations and memory corruption and memory safety in general. “You know, just write good, robust code from the start,” he says.

Julius Gustavsson says he started introducing Rust to Volvo’s low-power mainframe hub. The tech expert sees a bright future for Rust at Volvo, but that doesn’t mean it should be used to replace already working code that has been adequately tested. He notes that new Rust code can coexist at “almost arbitrary granularity” with existing C and C++, and that it might make sense to pick parts to rewrite Rust if that component needs cybersecurity.

“We want to extend Rust here at Volvo Cars to enable it on multiple nodes, and for that we need to get compiler support for some hardware targets and OS support for other targets. There’s no point in replacing already developed and well-tested code , but code developed from scratch should definitely be developed in Rust if possible,” he explains.

“That doesn’t mean Rust is a panacea. Rust still has its rough edges, and it forces you to make certain compromises that aren’t always the best. But overall, I think Rust has tremendous potential to provide allowing us to produce better quality code out of the box and at a lower cost, which would lower our warranty costs. So it’s a win-win situation for the bottom line.”

Working groups

Volvo isn’t the only automaker interested in Rust. Autosar, a group whose aim is to develop a standardized technical framework in the automotive industry and whose members include Ford, GM, BMW, Bosch, Volkswagen, Toyota, Volvo and many others, announced in April the creation of a new subgroup within its Security Functional Working Group (WG-SAF) to investigate how Rust could be used in one of its reference platforms.

SAE International has also established a working group to investigate the use of Rust in the automotive industry for safety-related systems.

Rust was also mentioned by Microsoft Azure CTO Mark Russinovich, who says that developers should avoid using C or C++ programming languages ​​in new projects and use Rust instead.


Leave a Comment