Programming: Why these developers love Rust in their cars


Software engineers at automaker Volvo have detailed why they’re 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’s time to add Volvo’s software engineers to that list.

Julius Gustavsson, 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, which C and C++ don’t do automatically, hence Rust’s growing popularity in systems programming. Memory-related bugs 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 conditions and memory corruption, and memory safety in general. “You know, just write good, robust code from the get-go,” he says.

Julius Gustavsson says he started introducing Rust to Volvo with the low-power mainframe node. 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 expand Rust here at Volvo Cars to enable it on more 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’s not to say that 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 huge potential to allow 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 end result. »

Workgroups

Volvo isn’t the only automaker interested in Rust. Autosar, a group whose objective is to develop a standardized technical framework in the automobile 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 functional security working group (WG-SAF) to study how Rust could be used in one of its reference platforms.

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

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

Source: ZDNet.com





Source link -97