The release candidate for the latest version of the Linux kernel was announced last month, and one of the highlights in the release notes for Linux 6.1 is the inclusion of the initial infrastructure for adding Rust as a language. 

Rust has been growing steadily in popularity through the years, and though according to the 2022 Stack Overflow Developer Survey 9 percent of developers use it, it has spent seven years in the top spot for “most loved” language. In this year’s survey almost 87% of developers said they love Rust, which is about 10 percentage points higher than the second-most loved language, Elixir. 

According to Joel Marcey, director of advocacy and operations for the Rust Foundation, one of the benefits of Rust over C is that it provides security without sacrificing the performance and speed that C provides, the current language for the Linux kernel. One of the key points of the language that people love is that it is memory safe.  

“With Rust, you don’t have to concern yourself with explicit and precise memory management, right? So you don’t have to worry about, you know, allocating and de-allocating pointers, and those sorts of things, which can actually be really big causes of things like buffer overflows, and other really big security vulnerabilities,” said Marcey. 

In the release notes, Linus Torvalds described what is in 6.1 as “initial Rust scaffolding,” as no Rust code is actually present yet. 

“What they’re doing is actually providing the metal so that you can actually write Rust in the future,” Marcey explained. “So they’re providing the infrastructure so that you can compile Rust code. That’s what’s going to be needed initially in order to do any future work with Rust in the Linux kernel … You need to get all those things that can make sure that Rust can compile and, and you can do the debugging and all these things, and make sure that the memory safety is there and all that sort of stuff. And that has to happen first before you can actually write any real code in Rust for the Linux kernel itself.”

Marcey explained that Linux is going to be doing this inclusion very piecemeal, with lots of little integrations here and there over time so they can see how it is working.  

“I would imagine that over the next year, you’re going to see more small incremental changes to the kernel with Rust, but as people are seeing that it’s actually kind of working out, you’ll be able to maybe, for example, write Linux drivers or whatever with Rust,” said Marcey. 

In fact, work has already been done since the 6.1 release to add more infrastructure for Rust in the kernel, though still none of the code interacts with any C code. This patch series is part of the dedicated effort to continue adding Rust support. 

According to Rebecca Rumbul, executive director of the Rust Foundation, Rust being added to the kernel is an “enormous vote of confidence in the Rust programming language.” She explained that in the past other languages have been planned to make it into the kernel and ended up not getting put in. 

“I think having someone with the kind of intellectual gravity of Linus Torvalds saying ‘No, it’s going in there,’ that kind of says an awful lot about how reliable Rust already is and how much potential there is for the future as well,” she said. 

She believes that there will be an increased interest in the language, which is still relatively new (It first made its debut in 2010) compared to some of the other languages out there to choose from. 

“I suspect that because Rust is now in the kernel, and it’s just being talked about much … more widely, that it will seem like an attractive prospect to a lot of people that are looking to develop their skills and their knowledge,” she said.

She hopes people will also be inspired to participate in the language as contributors and maintainers, because those are some of the less popular roles within open source, but are extremely critical to the health of a language, she explained. 

Rumbul noted that the Rust community is a diverse and welcoming one as well. 

“Don’t think for a second, ‘oh, I’m not good enough.’ Or don’t be dazzled by people that you’ve seen in the project doing things publicly or doing things on GitHub. As I said, the community is incredibly welcoming. And we get an awful lot of imposter syndrome, I think, where people think they’re not quite good enough to take part or it looks like it’s working from the outside, therefore, we don’t need any help. I know the project teams are all incredibly enthusiastic about bringing new people in,” said Rumbul.

In addition to the Linux news, the Rust Foundation also made headlines recently for forming a new security program so they can explore how to solve global security issues with Rust. 

The program received significant funding from the OpenSSF’s Alpha-Omega initiative and is also being supported by DevOps company JFrog, which is a platinum member of the Rust Foundation. 

The first goal of the program is to “undertake a security audit and threat modeling exercises to identify how security can be economically maintained going forward,” a blog post from the Rust Foundation states. 

“We want to basically shore up to ensure that Rust itself is actually as secure as we always say it is,” said Marcey. 

Complaints over pull requests

There was also some controversy in this latest Linux release, as Torvalds expressed frustration at the number of pull requests coming in at the end of the merge window. 

“Yes, the merge window is two weeks, but that’s very much to allow me time to look things over, not ‘two weeks to hurriedly put together a branch that you send Linus on Friday of the second week.’ The whole ‘do an all-nighter to get the paper in the day before the deadline’ is something that should have gone out the window after high school. Not for kernel development,” he wrote. 

He clarified that pull requests should be sent before the merge window starts, not during it.