Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

511–520 of 853 posts

Re: Rust in the kernel is no longer experimental

#511

Earlier quoted context omitted.

There is, I understand, an expectation that if you do make breaking changes to kernel APIs, you fix the callers of such APIs. Which has been a point of contention, that if a maintainer doesn't know Rust, how would they fix Rust users of an API? The Rust for Linux folks have offered that they would fix up such changes, at least during the experimental period. I guess what this arrangement looks like long term will be…

Without a very hard commitment that is going to be a huge hurdle to continued adoption, and kernel work is really the one place where rust has an actual place. Everywhere else you are most likely better off using either Go or Java.

Aren't large parts of a web browser and a runtime for a programming language also better written in Rust than in Go or Java?

Re: Rust in the kernel is no longer experimental

#512

Earlier quoted context omitted.

Okay I had upvoted you but now you're just being an asshole. Predictable from someone on multiple fucking throwaways created just to answer on a single post and crap on a piece of tech I suppose; I don't even care much about Rust. And I'm sorry to inform you I'm not Klabnik, but delusions are free: Maybe you think everyone using -nik is actually the same person and you've uncovered a conspiracy. Congrats on that. I'd…

[flagged]

This behavior is weird. Your parent writes nothing like me.

The only alt I’ve made on hacker news is steveklabnik1, or whatever I called it, because I had locked myself out of this account. pg let me back in and so I stopped using it.

Re: Rust in the kernel is no longer experimental

#513

Earlier quoted context omitted.

I don't understand why. Working with hardware you're going to have to do various things with `unsafe`. Interfacing to C (the rest of the kernel) you'll have to be using `unsafe`. In my mind, the reasoning for rust in this situation seems flawed.

I’ve done a decent amount of low level code - (never written a driver but I’m still young). The vast majority of it can be safe, and call into unsafe wrapped when needed. My experience is that a very very small amount of stuff actually needs unsafe and the only reason the unsafe C code is used is because it’s possible not because it’s necessary.

It is interesting how many very experienced programmers have not yet learned your lesson, so you may be young but you are doing very well indeed. Kudos.

Re: Rust in the kernel is no longer experimental

#515

Earlier quoted context omitted.

> Rustians disparage C No, the 50+ years of ridiculously unavoidable memory corruption errors have done more to disparage C than anyone working in another language.

I don't think C should be disparaged at all. Just because I prefer torx screws doesn't mean phillips screws were a horrible idea. They were brilliantly simple and enormously effective. I can't think of a single situation in which I wouldn't prefer torx, but torx wasn't an option historically and phillips was not the wrong decision at the time. Times change.

[dead]

Re: Rust in the kernel is no longer experimental

#516

Earlier quoted context omitted.

https://lwn.net/Articles/1045363/ > Rust, which has been cited as a cause for concern around ensuring continuing support for old architectures, supports 14 of the kernel's 20-ish architectures, the exceptions being Alpha, Nios II, OpenRISC, PARISC, and SuperH.

Its strange to me that Linux dropped Itanium two years ago but they decided to keep supporting Alpha and PA-RISC.

I do wonder how many humans beings are running the latest linux kernel on Alpha.

Re: Rust in the kernel is no longer experimental

#517
post #202
post #172

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

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

I think that unlike user level software performance of a kernel is of utmost importance.

Re: Rust in the kernel is no longer experimental

#518

Earlier quoted context omitted.

Oh I agree the survey has issues, I was just thinking about how each year the stats get more questionable! I just think it shows that interest in Rust doesn't come only from people with a C++ codebase to rewrite. Half of all devs have got less than five years of experience with any toolchain at all, let alone C++, yet many want to give Rust a try. I do think there will be a generational split there. > Steve Klabnik?…

[flagged]

Steve has no active alter-egos on HN. Stop with your ridiculous behavior.

Re: Rust in the kernel is no longer experimental

#520
post #506

Earlier quoted context omitted.

Depends on the change being made. If they completely replace an API then sure, probably. But for most changes, like adding a param to a function or a struct, they basically have to learn nothing. Rust isn't unlike C either. You can write a lot of it in a pretty C like fashion.

>"Rust isn't unlike C either. You can write a lot of it in a pretty C like fashion." I think that with all of the Rust's borrowing rules the statement is very iffy.

C has a lot of the same borrowing rules, though, with some differences around strict aliasing versus the shared/exclusive difference in Rust.

Most of the things people stub their toe on in Rust coming from C are already UB in C.

Post reply on HN