/>
X
Business

Rust programming language: Driving innovation in unexpected places

Why the Rust is finding a new home - in cars.
Written by Liam Tung, Contributing Writer on
cars
Image: Getty Images/Jung Getty

Software engineers at car maker Volvo have detailed why they are fans of the Rust programming language and argue that Rust is actually "good for your car". 

It seems everyone loves 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 seems it's time to add software engineers at Volvo to that list.

Julius Gustavsson, a technical expert and system architect at Volvo Cars Corporation, explains "Why Rust is actually good for your car" in an interview on Medium with fellow Volvo software engineer, Johannes Foufas

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

Gustavsson brings a perspective from embedded systems development to the debate.

Volvo, along with the auto Industry in general, is looking towards "software-defined cars" to customize, differentiate and improve vehicles after they leave the car yard. 

The main benefits he sees from Rust include: not having to think about race conditions and memory corruption, and memory safety in general. "You know, just writing correct and robust code from the start," he said.

Gustavsson says he started bringing Rust into Volvo with the Low Power node of the core computer.

Gustavsson sees a bright future for Rust in Volvo but that doesn't mean using it to replace already working code that's been adequately tested. He notes that new Rust code can co-exist with "almost arbitrary granularity" with existing C and C++ and that it could make sense to cherry pick parts to rewrite Rust if that component needs cybersecurity. 

"We want to expand Rust here at Volvo Cars to enable it on more nodes and to do that, we need to get compiler support for certain hardware targets and OS support for other targets. There is no point in replacing already developed and well-tested code, but code developed from scratch should definitely be developed in Rust, if at all feasible.

"That is not to say that Rust is a panacea. Rust has some rough edges still and it requires you to make certain trade-offs that may not always be the best course of action. But overall, I think Rust has huge potential to allow us to produce higher quality code up front at a lower cost which in turn would reduce our warranty costs, so it's a win-win for the bottom line," he said.

Volvo isn't the only automaker interested in Rust. Autosar, an automotive standards group — whose members include Ford, GM, BMW, Bosch, Volkswagen, Toyota, Volvo and many more — in April announced a new subgroup within its Working Group for Functional Safety (WG-SAF) to explore how Rust could be used in one of its reference platforms. SAE International also set up a task force to look at Rust in the automotive industry for safety-related systems.

Rust has also been in the news with Mark Russinovich, the chief technology officer of Microsoft Azure, saying that developers should avoid using C or C++ programming languages in new projects and instead use Rust.

Editorial standards

Related

Programming languages: How Google is using Rust to reduce memory safety vulnerabilities in Android
Rust

Programming languages: How Google is using Rust to reduce memory safety vulnerabilities in Android

Top programming languages list: An unexpected change at the top
shutterstock-1500204824.jpg

Top programming languages list: An unexpected change at the top

This 1980s programming language sparked a revolution. Now you can check out the source code
developers-security

This 1980s programming language sparked a revolution. Now you can check out the source code