Comment by weinzierl

3 months ago

That is so good to hear. I feel Rust support came a long way in the past two years and you can do a functional Rust kernel module now with almost no boilerplate.

Removing the "experimental" tag is certainly a milestone to celebrate.

I'm looking forward to distros shipping a default kernel with Rust support enabled. That, to me, will be the real point of no return, where Rust is so prevalent that there will be no going back to a C only Linux.

A few distros already do that. Of the top of my head, both NixOS and Arch enable the QR code kernel panic screen, which is written in Rust. Granted, those are rather bleeding edge, but I know a few more traditional distros have that enabled (I _think_ fedora has it? But not sure).

> I'm looking forward to distros shipping a default kernel with Rust support enabled

What does this mean? The kernel has no specific support for Rust userspace -- the syscall API does not suddenly change because some parts of the kernel are compiled with rustc.

  • They aren’t talking about userspace.

    As I understand it, the kernel has a flag, no by default, to enable building rust code as part of the kernel. They’re saying they’d like to see a distributed choosing to default this flag to yes for the kernels they build.

[flagged]

  • Because someday the programming state of the art must advance beyond 1970, and someday we must stop introducing new memory safety bugs that cause horrific vulnerabilities, and for kernel code we don't have the luxury of recompiling everything with garbage collection turned on as a band-aid for C's incurable defects.

  • I believe Linus responded to this very question. I recommend that you read through his email.

    Basically, technology evolves, and you or anyone else can't stop that just because you don't like it for whatever nonsense (non technical) reason.

    • He also said in that same email regarding Rust that:

      > nobody is forced to suddenly have to learn a new language, and that people who want to work purely on the C side can very much continue to do so.

      So any argument that Rust would ever fully replace C in such a way that C would go away and be banned in the kernel is NOT what Linus said.

      https://lkml.org/lkml/2025/2/20/2066

      4 replies →

  • Going off on the name makes your entire question and argument subjective and useless in a constructive discussion.

    • In-general it seems that Rust proponents want ease and modernity to replace the ability to do the same in C better, with more control and intent, and with better results.

      Rust is less tight. That’s fine for an application, but the kernel is used by everyone who uses Linux.

      Rustians disparage C because it doesn’t have Rust behavior.

      Why must the kernel have Rust behavior?

      4 replies →