Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

461–470 of 853 posts

Re: Rust in the kernel is no longer experimental

#461

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.

[flagged]

I’m not really sure what point you’re making. All I see there is - or was - some unclear management within Linux itself.

- There was an experiment to have rust in Linux. It got provisional approval from Linus.

- Some people in the Linux kernel blocked essentially any changes being made to make the rust experiment able to succeed.

- Some people who were trying to get rust into Linux got frustrated. Some quit as a result.

- Eventually Linus stepped in and told everyone to play nice.

This whole drama involved like 5 people. It’s not “the majority of the rust community”. And it kinda had nothing to do with rust the language. It was really a management / technical leadership challenge. And it seems like it’s been addressed by leadership stepping in and giving clearer guidelines around how rust and C should interoperate, both at a technical and interpersonal level.

So what’s your point? Is rust bad because some people had an argument about it on the Linux kernel mailing list about it? ‘Cos uh, that’s not exactly a new thing.

Re: Rust in the kernel is no longer experimental

#462
post #285

Earlier quoted context omitted.

Many organizations and environments will not switch themselves to LLVM to hamfist compiled Rust code. Nor is the fact of LLVM supporting something in principle means that it's installed on the relevant OS distribution.

If you're developing, you generally have control over the development environment (+/-) and you can install things. Plus that already reduces the audience: set of people with oddball hardware (as someone here put it) intersected with the set of people with locked down development environments. Let alone the fact that conceptually people with locked down environments are precisely those would really want the extra saf…

> If you're developing, you generally have control over the development environment

If you're developing something individually, then sure, you have a lot of control. When you're developing as part of an organization or a company, you typically don't. And if there's non-COTS hardware involved, you are even more likely not to have control.

Re: Rust in the kernel is no longer experimental

#463

Earlier quoted context omitted.

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

If anyone submitted such a PR to one of my projects and could explain compelling benefits for why doing so would be a general improvement, even considering trade-offs of increased complexity/maintainability, etc., then I'd be delighted they'd cared enough to improve my software.

[flagged]

Re: Rust in the kernel is no longer experimental

#464
post #310
post #59

Earlier quoted context omitted.

I wouldn't be surprised to see zig in the kernel at some point

I would be. Mostly because while Zig is better than C, it doesn't really provide all that much benefit, if you already have Rust.

I personally feel the Zig is a much better fit to the kernel. It's C interoperability is far better than Rust's, it has a lower barrier to entry for existing C devs and it doesn't have the constraints the Rust does. All whilst still bringing a lot of the advantages.

...to the extent I could see it pushing Rust out of the kernel in the long run. Rust feels like a sledgehammer to me where the kernel is concerned.

It's problem right now is that it's not stable enough. Language changes still happen, so it's the wrong time to try.

Re: Rust in the kernel is no longer experimental

#465

Earlier quoted context omitted.

Pardon my ignorance but I find the claim "removing the nastiest cla ss of security vulnerabilities" to be a bold claim. Is there ZERO use of "unsafe" rust in kernel code??

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

#466
post #440

Earlier quoted context omitted.

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

They wrote their own language (C) too. They invented a new language because the current crop of languages didn't suit their needs. Your argument ignores the parts of history that are inconvenient and highlights the ones that you think support it.

You mean as in "having fun"?

"Although we entertained occasional thoughts about implementing one of the major languages of the time like Fortran, PL/I, or Algol 68, such a project seemed hopelessly large for our resources: much simpler and smaller tools were called for. All these languages influenced our work, but it was more fun to do things on our own."

-- https://www.nokia.com/bell-labs/about/dennis-m-ritchie/chist...

People arguing for UNIX/C, also tend to forget the decade of systems languages that predates them, starting with JOVIAL in 1958.

They also forget that after coming up with UNIX/C, they went on to create Plan 9, which was supposed to use Alef, abandoned its designed, later acknowledege lack of GC as an key issue, created Inferno and Limbo, finalizing with contributions to Go's original design.

"Alef appeared in the first and second editions of Plan 9, but was abandoned during development of the third edition.[1][2] Rob Pike later explained Alef's demise by pointing to its lack of automatic memory management, despite Pike's and other people's urging Winterbottom to add garbage collection to the language;[3] also, in a February 2000 slideshow, Pike noted: "…although Alef was a fruitful language, it proved too difficult to maintain a variant language across multiple architectures, so we took what we learned from it and built the thread library for C."[4]"

-- https://en.wikipedia.org/wiki/Alef_(programming_language)

UNIX and C creators moved on, apparently those that whorship them haven't got the history lesson up to date.

Re: Rust in the kernel is no longer experimental

#467

Earlier quoted context omitted.

[flagged]

Didn't Hector step down essentially as a direct result of that behavior? https://www.phoronix.com/news/Asahi-Linux-Lead-No-Upstream Do you have an example of other R4L maintainers harassment? Because you've spammed the same single example 3-4 times on this post alone.

[flagged]

Re: Rust in the kernel is no longer experimental

#468

Earlier quoted context omitted.

[flagged]

I’m not really sure what point you’re making. All I see there is - or was - some unclear management within Linux itself. - There was an experiment to have rust in Linux. It got provisional approval from Linus. - Some people in the Linux kernel blocked essentially any changes being made to make the rust experiment able to succeed. - Some people who were trying to get rust into Linux got frustrated. Some quit as a resu…

[flagged]

Re: Rust in the kernel is no longer experimental

#469
post #331

Earlier quoted context omitted.

About as real as claiming that C/C++ is memory safe because of sanitizers IMHO.

I mean, Zig does have non-null pointers. It prevents some UB. Just not all.

Which you can achieve in C and C++ with static analysis rules, breaking compilation if pointers aren't checked for nullptr/NULL before use.

Zig would have been a nice proposition in the 20th century, alongside languages like Modula-2 and Object Pascal.

Re: Rust in the kernel is no longer experimental

#470

Earlier quoted context omitted.

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

That’s a reasonable position today, but what about in 20 years?

Do you know what technology will look like in 5 years? Or even 1 year?
Post reply on HN