@dang title has been changed to "The (successful) end of the kernel Rust experiment", since there were complaints in the articles comments from the committee members that that was a sensationalization of what actually happened.
Isn't successful already implied? Unsuccessful experiments have no end unless motivation to keep trying runs out — but Rust seems to have no end to motivation behind it. Besides, if it were to ever reach the point of there being no remaining motivation, there would be no remaining motivation for those who have given up to announce that they have given up, so we'd never see the headline to begin with.
Rust in the kernel is no longer experimental
611–620 of 853 posts
Re: Rust in the kernel is no longer experimental
#612C++ devs are spinning in their graves now.
Why should they? Other platforms don't have a leader that hates C++, and then accepts a language that is also quite complex, even has two macro systems of Lisp like wizardy, see Serde. OSes have been being written with C++ on the kernel, since the late 1990's, and AI is being powered by hardware (CUDA) that was designed specifically to accomodate C++ memory model. Also Rust compiler depends on a compiler framework wr…
As does the GCC C compiler.
Re: Rust in the kernel is no longer experimental
#613Earlier quoted context omitted.
Don’t spread FUD, you can check some example code yourself. https://git.kernel.org/pub/scm/linux/kernel/git/a.hindborg/l...
Sorry but what have I said wrong? The nature of code written in kernel development is such that using unsafe is inevitable. Low-level code with memory juggling and patterns that you usually don't find in application code. And yes, I have had a look into the examples - maybe one or two years there was a significant patch submitted to the kernel and number of unsafe sections made me realize at that moment that Rust, in…
Have you written any Rust?
Re: Rust in the kernel is no longer experimental
#614Earlier quoted context omitted.
wasn't there like a drive by maintainer rejection of something rust related that kind of disrupted the asahi project ? i can't say i followed the developments much but i do recall it being some of that classic linux kernel on broadway theater. i also wonder if that was a first domino falling of sorts for asahi, i legitimately can't tell if that project lives on anymore
It involved large parts of the Rust community, and the famous Rust developer Hector Martin (with an alter ego of Asahi Lina, a female vtuber, which he appears irrationally embarrassed about), harassing others. Even Linus Torvalds called out Hector Martin. https://lkml.org/lkml/2025/2/6/1292 > On Thu, 6 Feb 2025 at 01:19, Hector Martin wrote: > > If shaming on social media does not work, then tell me what does, becaus…
Re: Rust in the kernel is no longer experimental
#615And yet, the Linux kernel's Rust code uses unstable features only available on a nightly compiler. Not optimal for ease of compilation and building old versions of the Kernel. (You need a specific version of the nightly compiler to build a specific version of the Kernel)
Re: Rust in the kernel is no longer experimental
#616Earlier quoted context omitted.
You can absolutely write drivers with zero unsafe Rust. The bridge from Rust to C is where unsafe code lies.
And hardware access. You absolutely can't write a hardware driver without unsafe.
Re: Rust in the kernel is no longer experimental
#617Earlier quoted context omitted.
It's great that the Google Android team has been tracking data to answer that question for years now and their conclusion is: ------- The primary security concern regarding Rust generally centers on the approximately 4% of code written within unsafe{} blocks. This subset of Rust has fueled significant speculation, misconceptions, and even theories that unsafe Rust might be more buggy than C. Empirical evidence shows…
> The practice of encapsulation enables local reasoning about safety invariants. > The additional scrutiny that unsafe{} blocks receive. None of this supports an argument that "unsafe Rust is safer than C". It's just saying that with enough scrutiny on those unsafe blocks, the potential bugs will be found and addressed as part of development. That's a rather different claim.
It's safer because it spends the human attention resource more wisely.
Re: Rust in the kernel is no longer experimental
#618Earlier quoted context omitted.
Can you please share more details about this?
https://rust-for-linux.com/unstable-features#unstable-featur...
https://www.phoronix.com/news/Linux-Patches-Multiple-Rust-Ve...
Re: Rust in the kernel is no longer experimental
#619Earlier quoted context omitted.
Isn't successful already implied? Unsuccessful experiments have no end unless motivation to keep trying runs out — but Rust seems to have no end to motivation behind it. Besides, if it were to ever reach the point of there being no remaining motivation, there would be no remaining motivation for those who have given up to announce that they have given up, so we'd never see the headline to begin with.
We've done unsuccessful experiments on HN over the years, in the sense that they failed to achieve anything we'd hoped for and caused enough damage that we had to call them off.
Imagine a world where the Rust experiment hand't been going well. There is absolutely nothing stopping someone from keeping at it to prove why Rust should be there. The experiment can always live as long as someone wants to keep working on it. Experiments fundamentally can only end when successful, or when everyone gives up (leaving nobody to make the announcement).
That said, consider me interested to read the announcements HN has about those abandoned experiments. Where should I look to find them?
Re: Rust in the kernel is no longer experimental
#620Earlier quoted context omitted.
I am not a system programmer but, from my understanding, Torvalds has expressed strong opinions about microkernels over a long period of time. The concept looks cleaner on paper but the complexity simply outweighs all the potential benefits. The debate, from what I have followed, expressed similar themes as monolithic vs microservices in the wider software development arena.
I'm not a kernel developer myself, but I’m aware of the Tanenbaum/Torvalds debates in the early 90’s. My understanding is the primary reason Linus gave Tanenbaum for the monolithic design was performance, but I would think in 2025 this isn’t so relevant anymore. And thanks for attempting to answer my question without snark or down voting. Usually HN is much better for discussion than this.