While Linux 7.0 is the next kernel version solely over Linus Torvalds’ numbering preference, there is a notable symbolic change that was sent in overnight for this new kernel merge window: formally concluding the “Rust experiment” with upstream kernel developers now in acceptance that Rust for the Linux kernel is here to stay.

The patch was talked about back in December that the Rust experiment is over and it’s here to stay. There are already uses for Rust in production environments, some Linux distributions shipping with Rust kernel code, and millions of Android devices also using it.

  • Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    6 hours ago

    From the perspective of somebody who’s actually hacked on Linux: Most Linux maintainers, like most programmers in general, are full of machismo stemming from the inherent difficulty of writing C. It is extremely difficult to write correct C and nobody can do it consistently, so those maintainers are heavily invested in the perception that they are skilled with C. Rust is much easier to write and democratizes kernel hacking, which is uncomfortable for older maintainers due to the standard teenagers-vs-parents social dynamics. Worse, adapting various kernel interfaces so that they are Rust-friendly has revealed that the pre- and postconditions of interface methods were not known before; there is existing sloppiness in the kernel’s internals which is only visible because of Rust-related cleanups.

    Note that Linux is not a GNU project. GNU’s kernel project is GNU Herd. “GNU/Linux” refers to Linux userlands populated with GNU packages. It’s important not to be distracted by this; the kernel is agnostic towards userland and generally is compatible with any loadable executable that uses Linux’s public syscall interface, so the entire discussion of Rust in the kernel is separate from anything going on in userland.

    Most siblings are wrong! PRs written in Rust can be rejected. There are already multiple non-C languages in the kernel. Rust is sufficiently available on the platforms where it will be required for building kernel. Maintainers are only added after they have shown themselves to be socially reliable and they can be removed by other maintainers if they are unresponsive. The only correct sibling points out that Rust is different.