Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

411–420 of 853 posts

Re: Rust in the kernel is no longer experimental

#411

Earlier quoted context omitted.

IIRC, it was not about Rust vs. C, but a commotion rooted from patch quality and not pushing people around about things. Linux Kernel team has this habit of a forceful pushback which breaks souls and hearts when prodded too much. Looks like Hector has deleted his Mastodon account, so I can't look back what he said exactly. Oh, I still have the relevant tab open. It's about code quality: https://news.ycombinator.com/i…

https://lkml.org/lkml/2025/2/6/1292

Some pretext: I'm a Rust skeptic and tired of Rust Evangelism Task Force and Rewrite in Rust movements.

---

Yes. I remember that message.

Also let's not forget what marcan said [0] [1].

In short, a developer didn't want their C codebase littered with Rust code, which I can understand, then the Rust team said that they can maintain that part, not complicating his life further (Kudos to them), and the developer lashing out to them to GTFO of "his" lawn (which I understand again, not condone. I'd have acted differently).

This again boils down to code quality matters. Rust is a small child when compared to the whole codebase, and weariness from old timers is normal. We can discuss behaviors till the eternity, but humans are humans. You can't just standardize everything.

Coming to marcan, how he behaved is a big no in my book, too. Because it's not healthy. Yes, the LKML is not healthy, but this is one of the things which makes you wrong even when you're right.

I'm also following a similar discussion list, which has a similar level of friction in some matters, and the correct thing is to taking some time off and touching grass when feeling tired and being close to burnout. Not running like a lit torch between flammable people.

One needs to try to be the better example esp. when the environment is not in an ideal shape. It's the hardest thing to do, but it's the most correct path at the same time.

[0]: https://web.archive.org/web/20250205004552mp_/https://lwn.ne...

[1]: https://lkml.org/lkml/2025/2/6/404

Re: Rust in the kernel is no longer experimental

#412

I guess it's time to finally try FreeBSD.

Why? Are you allergic to running rust code? You know, you can’t actually tell when you execute a binary?

I don’t like programming in Go, but nothing stops me running go programs on my computer. My computer doesn’t seem to care.

Re: Rust in the kernel is no longer experimental

#413

Earlier quoted context omitted.

The Unix/C people wrote their own kernel in the 1970s instead of invading an existing one.

If rust didn’t provide value to the Linux kernel, there’s no way it would have made out of the experimental phase. Rust isn’t an invading tribe. It’s just a tool.

[flagged]

Re: Rust in the kernel is no longer experimental

#414

Earlier quoted context omitted.

IIRC, it was not about Rust vs. C, but a commotion rooted from patch quality and not pushing people around about things. Linux Kernel team has this habit of a forceful pushback which breaks souls and hearts when prodded too much. Looks like Hector has deleted his Mastodon account, so I can't look back what he said exactly. Oh, I still have the relevant tab open. It's about code quality: https://news.ycombinator.com/i…

> Looks like Hector has deleted his Mastodon account, so I can't look back what he said exactly. https://archive.md/uLiWX https://archive.md/rESxe

Thanks! Let me edit this in, too.

Edit: Nah, I can't, too late.

Re: Rust in the kernel is no longer experimental

#415

Earlier quoted context omitted.

If rust didn’t provide value to the Linux kernel, there’s no way it would have made out of the experimental phase. Rust isn’t an invading tribe. It’s just a tool.

> Rust isn’t an invading tribe People doing open-source work often feel very tribal about their code and block ideas that are good but threaten their position in the community. Essentially same thing as office politics except it's not about money, it's about personal pride.

I'm sure that submitting a PR to a Rust project to rewrite parts in Ada/SPARK would be met with great enthusiasm.

Re: Rust in the kernel is no longer experimental

#417

Earlier quoted context omitted.

Kind of tells you something about how timidly and/or begrudgingly it’s been accepted. IMO the attitude is warranted. There is no good that comes from having higher-level code than necessary at the kernel level. The dispute is whether the kernel needs to be more modern, but it should be about what is the best tool for the job. Forget the bells-and-whistles and answer this: does the use of Rust generate a result that i…

The kind of Rust you would use in the kernel is no more high-level than C is.

Yeah, I don't know what the hell they are talking about.

Re: Rust in the kernel is no longer experimental

#418
post #288

Earlier quoted context omitted.

The C++ that have the humility to realize are using Rust.

Nah, they just smile when they see LLVM and GCC on Rust build dependencies. :)

Yeah they’re all just tools. From a technical perspective, rust, C and C++ work together pretty well. Swift too. LLVM LTO can even do cross language inlining.

I don’t think C++ is going anywhere any time soon. Not with it powering all the large game engines, llvm, 30 million lines of google chrome and so on. It’s an absolute workhorse.

Re: Rust in the kernel is no longer experimental

#419
post #401

Earlier quoted context omitted.

> let's start by prefacing that 'production quality' C is 100% unsafe in Rust terms. I don't know what one should even make from that statement. > here's where we fundamentally disagree: you listed a couple dozen unsafe places in 1.5kLOC of code; let's be generous and say that's 10% It's more than 10%, you didn't even bother to look at the code but still presented it, what in reality is a toy driver example, as somet…

> I don't know what one should even make from that statement. it's just a fact. by definition of the Rust language unsafe Rust is approximately as safe as C (technically Rust is still safer than C in its unsafe blocks, but we can ignore that.) > you didn't even bother to look at the code but still presented of course I did, what I've seen were one-liner trait impls (the 'whole traits' from your own post) and sub-line…

> technically Rust is still safer than C in its unsafe blocks

This is quite dubious in a practical sense, since Rust unsafe blocks must manually uphold the safety invariants that idiomatic Safe Rust relies on at all times, which includes, e.g. references pointing to valid and properly aligned data, as well as requirements on mutable references comparable to what the `restrict` qualifier (which is rarely used) involves in C. In practice, this is hard to do consistently, and may trigger unexpected UB.

Some of these safety invariants can be relaxed in simple ways (e.g. &Cell being aliasable where &mut T isn't) but this isn't always idiomatic or free of boilerplate in Safe Rust.

Re: Rust in the kernel is no longer experimental

#420

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 goin…

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).

> both NixOS and Arch enable the QR code kernel panic screen

Interesting, I use both (NixOS on servers, Arch for desktop) and never seen that. Seems you're referring to this: https://rust-for-linux.com/drm-panic-qr-code-generator (which looks like this: https://github.com/kdj0c/panic_report/issues/1)

Too bad NixOS and Arch is so stable I can't remember the last time any full system straight up panicked.

Post reply on HN