Rust Split Linux into Two Factions, Are They Really Incompatible?

Linux has been around for 33 years, and to this day, its founder Linus has been arguing constantly to promote its development and is a notorious "tyrant."

However, regarding the setbacks in Rust's entry into the Linux kernel, Linus seemed to become calm, even somewhat "rationally negative". Linus admitted that he didn't understand why Rust was still so controversial until now!

1. Linux has split into two factions

In early September, a Linux kernel maintainer named Wedson posted a message online, revealing that he had a conflict with Rust language contributors and resigned angrily because he could not stand the "non-technical technical nonsense" in the process of adapting Rust's C plug-in.

The conflict between the C and Rust language contributors to the Linux kernel has been described by Linux founder Linus Torvalds as a "dispute that has almost the color of a religious war." In his keynote speech at the Open Source Summit on Wednesday, Torvalds said that while there is no lack of healthy debate in the dispute, some debates have become very negative.


Linus likened the dispute to the culture war between vi and emacs, over which text editor was superior, also known as the "Editor Wars."

"I actually enjoy the debate. I love debates. I think one of the great things about Rust is that it makes for some lively discussions, and while some of the arguments can get ugly... it shows how much people care. At the same time, I'm not quite sure why Rust has become such a controversial topic," Torvalds said. "It reminds me of when I was young and people were arguing about whether vi or emacs was better, but somehow the whole Rust vs. C debate has taken on an almost religious tone in some ways."

However, when it comes to choosing which editor or language to use, I believe most programmers will eventually answer: I don’t care.

Because programmers don't need to use the most difficult tools to prove their skills. A good programmer is lazy!

2. Linux is based on C, and Rust is declared as a sovereign

A person familiar with the matter revealed that a small group of C kernel developers seem determined to make the life of Rust maintainers as difficult as possible. They think Rust is worthless and would rather Rust disappear.

"Last year, when I was trying to upstream the DRM abstraction, basic support for a "device" concept in Rust was all but blocked. Even just a stub wrapper for struct device would have been sufficient. Only recently, over a year later, was this simple concept finally implemented."


It took more than a year for a concept to come to fruition, so you can imagine how difficult it will be to integrate Rust into the C version of Linux.

On the one hand, there are technical issues. "When I wrote the DRM scheduler abstraction, I encountered many memory safety issues caused by poor design of the underlying C code. Lifecycles were not documented at all, and it simply came down to 'design the driver to work like amdgpu, or something'."

But this reflects more of a human problem: this insider found that other C drivers would trigger the same error due to poor API issues, and when it came time to query the hidden lifecycle, the C maintainers remained unmoved.

In the eyes of the original C maintainer, if a C driver works, then a Rust driver must work in the same way.

Yes, on the surface it seems that there is a conflict between the features of the two languages, but in fact it is the maintainers of the C version kernel declaring their absolute sovereignty over Linux contributions to Rust contributors.

The new king is not yet established, and the old king is maintaining stability. Just as Linux has established its position as the open source hegemon through more than 30 years, the king of C language is somewhat awkward in its relationship with Rust, a rising star with great challenges in the future: on the one hand, it needs Rust to solve its own problems such as memory safety that have accumulated over the years, and on the other hand, when introducing Rust, it faces the embarrassment and anxiety of being reconstructed by adapting to the ideas of the new language.

This "embarrassment and uneasiness" can be described as "a Gandalf-level C wizard feeling ashamed to put on the Rust robes of a novice wizard again."

Some maintainers of the C kernel feel that their development beliefs are under attack, and it is not easy for them to suddenly accept that their code or their favorite code will soon become obsolete.

3. Rust enters the Linux triple dilemma

For latecomers, Rust faces three difficulties:

1. The Linux kernel's C interface is not shared with Rust, but when a Rust interface is proposed, it is pointed out as wrong and no fix is ​​suggested;

Second, even if the Rust interface is agreed to be merged, it is just a second-class citizen. When the C interface is refactored, the Rust interface cannot be updated, so no one will use the Rust interface to write a driver;

3. A toxic work environment. For example, in a Rust kernel presentation, the maintainer of the C kernel mocked in a seemingly casual but actually very intense way: "You just want more people to convert to your Rust religion!" This made the staff exhausted and burnout.

Here, we have to elaborate on the fact that Wedson's resignation also exposes another problem that we often overlook: the Linux working environment is becoming "disharmonious" and even "toxic."

Earlier this month, he mentioned a YouTube video about file systems in Rust in his announcement that he was stepping down as the Rust language maintainer for Linux projects: "To reiterate, no one is trying to force anyone to learn Rust, nor is anyone trying to prevent C code from being refactored," Wedson wrote.

This video is a presentation by Wedson and another developer, Kent, with some Linux kernel developers who write C language sitting below. These developers don't seem to care about the content of the 30-minute presentation, but rather mock a certain page of slides.

Wedson is a C programmer himself, but he is passionate about the Rust for Linux project.

“Thank you, Rust team on the Linux project, you’re awesome. It’s been a pleasure working with all of you; I always enjoy and look forward to the times we spend together discussing technical issues, finding solutions to bugs, etc. I feel lucky to work with such a talented and friendly group of people.”

"I wish the project all the best. I really believe the future of the kernel lies in memory-safe languages. I'm not a prophet, but if Linux doesn't internalize it, I'm afraid other kernels will do the same thing to it as Unix did."

4. The core of the problem: the development culture of both

At the heart of the problem lies the culture clash between C and Rust that arises when committing changes across language boundaries.

As Linus describes it today, C is a relatively "simple language," which is "one of the reasons why I like C and why a lot of C programmers like C. Of course, simplicity comes at a price, because it's simple, it's also easy to make mistakes.

“Rust is completely different. There are a lot of people who are used to the C language model and they don’t necessarily like this difference, and that’s okay.”

From Rust's perspective, it might make sense to modify a certain C interface for Rust users, while C users would like Rust to contribute so that it can be used in conjunction with C.

The controversy dates back more than three years ago, when it was suggested that Rust could become part of the kernel or even replace C because it offers certain safety advantages that C does not have. Nevertheless, the project has not stopped.

For example, the famous buffer overflow hacks or exploits that could be made with C and CPUs before are now almost obsolete. Although Rust provides some safety features and deficiencies, it is more difficult to learn than C, which is easier to master.

5. Why not make a pure Rust version of the kernel?

Some people may think of another solution: since Rust cannot be integrated into the C version of Linux, wouldn’t it be better to just make a Rust version of the Linux kernel?

The answer is no.

As Liz Rice, chief open source officer at Isovalent, a Cisco company, puts it, Rust is a newer language with "very powerful advantages, but not everyone is going to immediately know how to write Rust code. A lot of people working on the eBPF subsystem in the kernel are not going to suddenly switch to learning Rust in order to get their work done, right?"

Rice also mentioned a seemingly naive but very representative scenario: "I've seen people say, 'Oh, well, then why do we need the eBPF verifier? If we do everything in Rust, we can remove it.'" 

But it is clear that when the questioner said this, he did not fully understand the full purpose of the eBPF verifier. Development is not just about programming, but also about considering the needs and scenarios that the code serves.

Frederic Branczyk, CEO and founder of Polar Signals, agrees: “There are a lot of examples in Rust where you have to do something unsafe and then build safe abstractions on top of it.”

“So I’m certainly not thinking that Rust is going to be the savior of everything. I’m actually a big fan of Rust, but I think C is actually a very good language for writing operating systems, and Rust can do a lot of things.”

6. Battle between the king and the rookie

The situation where the king and the rookie coexist is often like this at the beginning, and it is difficult to balance. The king has accumulated a relatively stable and mature basic framework and path, but it also breeds problems that are difficult to overcome on its own; while the rookie, although emerging in areas where the king has difficulty focusing, often lacks the necessary and imperceptible time experience.

This is especially true in the technology field, where changes to the fundamental rules are often imperceptible at first, and then change exponentially quickly. Overall, C is well suited to rapidly evolving, resource-constrained environments. But when robustness, security, and maintainability are combined with overpowered hardware and a large amount of sharing, the situation is less than ideal. That's why Linus is pinning his hopes on Rust.

However, the Rust for Linux project brings new ground rules changes for kernel developers. Unfortunately for Linux, there seems to be some kind of insurmountable gap between Rust and C kernel contributors.

After all, the knowledge, experience, and perspective gained from decades of working effectively in complex environments are not limited to a specific language, and this is exactly what Rust needs to fit into Linux.

Tragically, whether the maintainers of the C version kernel can accept Rust's development method and provide valuable development experience for Rust is, at least for now, a difficult question to accept.

7. Last words: Linus has no solution

It has to be said that Linus hit a hard nail when integrating Rust into the Linux kernel.

The divide between the C and Rust camps is quite large. "Some people just don't like the concept of Rust and the intrusion of Rust into their domain... People even talked about the failure of Rust integration."

Linus also has no solution to this: "There are many people who are used to the C model, but they don't necessarily like the differences... It doesn't matter... Some people care about specific architectures, some people like file systems, and this is how it should be. This is how I look at Rust."

But Linus is full of expectations for the project: "We have been doing it for a few years, so it's too early to even say this now." However, he did not say too much: "But I also think that even if it fails (and I don't think it will), it is a way to learn. So, I think this kind of promotion is positive."

After all, time is the best cure for all problems. At the end of this discussion, the host made a teasing joke:

"Torvalds has been the figurehead of the Linux project for the past 33 years, but is unlikely to serve for another 33 years. Hopefully, by then, the debate over Rust will have been resolved."

Reference Links:

https://www.theregister.com/2024/09/02/rust_for_linux_maintainer_steps_down/

https://www.theregister.com/2024/09/19/torvalds_talks_rust_in_linux/