Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

291–300 of 853 posts

Re: Rust in the kernel is no longer experimental

#291

Earlier quoted context omitted.

What they mean is that the Linux kernel has a long-standing policy to keep the whole kernel compilable on every commit, so any commit that changes an internal API must also fix up _all_ the places where that internal API is used. While Rust in the kernel was experimental, this rule was relaxed somewhat to avoid introducing a barrier for programmers who didn't know Rust, so their work could proceed unimpeded while the…

So does this mean that the C developers might need to learn Rust or cooperate more with the rust developer team basically?

That's exactly the original question.

Re: Rust in the kernel is no longer experimental

#293
post #74
post #6

Earlier quoted context omitted.

That is why most of the world has not been using c/c++ for decades.

I'm not on the Rust bandwagon, but statements like this make absolutely no sense. A lot of software was written in C and C++ because they were the only option for decades. If you couldn't afford garbage collection and needed direct control of the hardware there wasn't much of a choice. Had their been "safer" alternatives, it's possible those would have been used instead. It's only been in the last few years we've see…

At least on PC world you could be using Delphi, for example, or Turbo Pascal before it.

Also I would refrain me to list all other alternatives.

Re: Rust in the kernel is no longer experimental

#294
post #148

> Mike: rachel and i are no longer dating > > rachel: mike that's a horrible way of telling people we're married from the meme section on that page.

I was confused but then noticed the actual headline of the submitted page: "The end of the kernel Rust experiment"

That was also the title of the HN post, before it was changed.

Re: Rust in the kernel is no longer experimental

#295

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

Re: Rust in the kernel is no longer experimental

#296
post #279

Earlier quoted context omitted.

> Google has probably the largest C++ codebase in the world. Migrating to Rust would be so expensive that the board would squash it. Google is transitioning large parts of Android to Rust and there is now first-party code in Chromium and V8 in Rust. I’m sure they’ll continue to write new C++ code for a good while, but they’ve made substantial investments to enable using Rust in these projects going forward. Also, if…

Unless rules have changed Rust is only allowed a minor role in Chrome. > Based on our research, we landed on two outcomes for Chromium. > We will support interop in only a single direction, from C++ to Rust, for now. Chromium is written in C++, and the majority of stack frames are in C++ code, right from main() until exit(), which is why we chose this direction. By limiting interop to a single direction, we control t…

> Unless rules have changed Rust is only allowed a minor role in Chrome.

I believe the Chromium policy has changed, though I may be misinterpreting: https://chromium.googlesource.com/chromium/src/+/refs/heads/...

The V8 developers seem more excited to use it going forward, and I’m interested to see how it turns out. A big open question about the Rust safety model for me is how useful it is for reducing the kind of bugs you see in a SOTA JIT runtime.

> They only see Rust for Android internals, not app developers

I’m sure, if only because ~nobody actually wants to write Android apps in Rust. Which I think is a rational choice for the vast majority of apps - Android NDK was already an ugly duckling, and a Rust version would be taken even less seriously by the platform.

Re: Rust in the kernel is no longer experimental

#297

Earlier quoted context omitted.

What they mean is that the Linux kernel has a long-standing policy to keep the whole kernel compilable on every commit, so any commit that changes an internal API must also fix up _all_ the places where that internal API is used. While Rust in the kernel was experimental, this rule was relaxed somewhat to avoid introducing a barrier for programmers who didn't know Rust, so their work could proceed unimpeded while the…

So does this mean that the C developers might need to learn Rust or cooperate more with the rust developer team basically?

I guess in practice you'd want to have Rust installed as part of your local build and test environment. But I don't think you have to learn Rust any more (or any less) than you have to learn Perl or how the config script works.

As long as you can detect if/when you break it, you can then either quickly pick up enough to get by (if it's trivial), or you ask around.

Re: Rust in the kernel is no longer experimental

#299
post #14

Earlier quoted context omitted.

Every system under the Sun has a C compiler. This isn't remotely true for Rust. Rust is more modern than C, but has it's own issues, among others very slow compilation times. My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative.

There is a set of languages which are essentially required to be available on any viable system. At present, these are probably C, C++, Perl, Python, Java, and Bash (with a degree of asterisks on the last two). Rust I don't think has made it through that door yet, but on current trends, it's at the threshold and will almost certainly step through. Leaving this set of mandatory languages is difficult (I think Fortran,…

Java hasn't ever been essential outside enterprise-y servers and those don't care about "any viable system".

Re: Rust in the kernel is no longer experimental

#300

Earlier quoted context omitted.

> I prefer debugging C I prefer not having to debug... I think most people would agree with that.

[dead]

https://blog.cloudflare.com/incident-report-on-memory-leak-c...

better to crash than leak https keys to the internet

Post reply on HN