In particular, Lars Bergstrom talked about the experience of migrating projects written in Go or C++ to the Rust programming language.
Bergstrom said that although Dropbox in 2016 and Figma in 2018 offered early descriptions of rewriting code in memory-safe Rust—and doubts about performance and language subsided—concerns about its reliability and security remained.
But significant changes have occurred in the software development ecosystem.
For example, in a new report from the White House's National Cyber Director's Office, developers are urged to use "memory-safe programming languages" and to move away from C or C++ programming tools. The advice is a step towards "protecting the building blocks of cyberspace."
According to the government, C and C++ allow arbitrary pointer arithmetic with direct memory addresses without boundary checking. However, the creator of C++, Bjarne Stroustrup, criticized the US government.
"I find it strange that the authors of these decrees do not notice the strong sides of modern C++ and the efforts aimed at ensuring security," he noted.
The main problem is that most security vulnerabilities in large codebases can be traced back to memory security errors. Rust can significantly, if not completely, avoid such problems when used correctly.
Back in September 2022, Microsoft Azure's Technical Director Mark Russinovich claimed that software projects that may have started in C/C++ should use Rust. This recommendation now extends beyond new projects and calls for a reworking of old code.
Rust Beats C++, Kotlin Beats Java
Lars Bergstrom notes that rewriting Go code in Rust has shown significant advantages.
"When we rewrote systems from Go to Rust, we found that it takes roughly the same size team, about the same amount of time to build them. That is, when transitioning from Go to Rust, there is no loss of performance. And interestingly, we see some benefits from this," Bergstrom said.
More importantly, according to Bergstrom, is the comparison of reworking C++ code into Rust.
"In each case, we observed a reduction of more than 2 times in the amount of effort required both to create services in Rust and to support and update those services written in Rust. For us, this is really significant because C++ code is very expensive. It's big teams and lots of work. There are risks," he said.
Bergstrom said that Google is undergoing a similar migration, moving developers from Java to Kotlin, and the time required for developers to retrain in both cases—Java to Kotlin and C++ to Rust—was the same.
So, after two months, approximately a third of developers feel as productive in their new language as they did in the old one.
Comments (0)
There are no comments for now