Live data from Hacker News

Rust in the kernel is no longer experimental

lwn.net

501–510 of 853 posts

Re: Rust in the kernel is no longer experimental

#501
post #155

Rust in the kernel feels like a red herring. For fault tolerance and security, wouldn’t it be a superior solution to migrate Linux to a microkernel architecture? That way, drivers and various other components could be isolated in sandboxes.

Then you can try the existing microkernels (e.g. Minix) or a Rust microkernel (Redox). You already have what you wish for.

Re: Rust in the kernel is no longer experimental

#502

Earlier quoted context omitted.

One perspective is that Rust appears to be forced into the Linux kernel through harassment and pressure. Instead of Rust being pulled, carefully, organically and friendly, and while taking good care of any significant objections. Objections like, getting the relevant features from unstable Rust into stable Rust, or getting a second compiler like gccrs (Linux kernel uses gcc for C) fully up and running, or ensuring th…

Personally, I observe that Rust is forced everywhere in the Linux ecosystem. One of my biggest concerns is uutils, mostly because of the permissive license it bears. The Linux kernel and immediate userspace shall be GPL licensed to protect the OS in my opinion. I have a personal principle of not using LLVM-based languages (equal parts I don't like how LLVM people behave against GCC and I support free software first a…

The language is moving too fast? The language is moving extremely slowly imo, too slowly for a lot of features. C++ is moving faster at this point.

Re: Rust in the kernel is no longer experimental

#503
post #425

Earlier quoted context omitted.

Which ones would that be?

In order to figure this out I took the list of platforms supported by Rust from https://doc.rust-lang.org/nightly/rustc/platform-support.htm... and those supported by Linux from https://docs.kernel.org/arch/index.html , cleaned them up so they can be compared like for like and then put them into this python script: linux = { "alpha", "arc", "arm", "aarch64", "csky", "hexagon", "loongarch", "m68k", "microblaze", "mips…

I've certainly used parisc and alpha, though not for some years now.

Re: Rust in the kernel is no longer experimental

#504
post #344
post #175

After all the resistance to Rust in the Linux Kernel, it's finally official. Kudos to the Linux Rust team!

https://www.phoronix.com/news/Alex-Gaynor-Rust-Maintainer >

we shall C the resolve of the RUST maintainers they are working on borrowed time ....

Re: Rust in the kernel is no longer experimental

#505

Earlier quoted context omitted.

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…

One perspective is that Rust appears to be forced into the Linux kernel through harassment and pressure. Instead of Rust being pulled, carefully, organically and friendly, and while taking good care of any significant objections. Objections like, getting the relevant features from unstable Rust into stable Rust, or getting a second compiler like gccrs (Linux kernel uses gcc for C) fully up and running, or ensuring th…

I think the main issue is that it never was about how rust programmers should write more rust. Just like a religion it is about what other people should do. That's why you see so many abandoned very ambitious rust projects to tackle x,y or z now written in C to do them all over again (and throw away many years of hardening and bug fixes). The idea is that the original authors can be somehow manipulated into taking these grand gifts and then to throw away their old code. I'm waiting for the SQLite rewrite in rust any day now. And it is not just the language itself, you also get a package manager that you will have to incorporate into your workflow (with risks that are entirely its own), new control flow models, terminology and so on.

Rust should have done exactly one thing and do that as good as possible: be a C replacement and do that while sticking as close as possible to the C syntax. Now we have something that is a halfway house between C, C++, JavaScript (Node.js, actually), Java and possibly even Ruby with a syntax that makes perl look good and with a bunch of instability thrown in for good measure.

It's as if the Jehova's witnesses decided to get into tech and to convince the world of the error of its ways.

Re: Rust in the kernel is no longer experimental

#506

Earlier quoted context omitted.

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

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.

Re: Rust in the kernel is no longer experimental

#507
post #297

Earlier quoted context omitted.

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.

The proof of the pudding will be in the eating, the rust community better step up in terms of long term commitment to the code they produce because that is the thing that will keep this code in the kernel. This is just first base.

Re: Rust in the kernel is no longer experimental

#509
post #203

Earlier quoted context omitted.

No maintainer is obligated to not break any part of Linux other than the user space API, there are no stable in-kernel APIs

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.

Re: Rust in the kernel is no longer experimental

#510
post #491
post #425

Earlier quoted context omitted.

In order to figure this out I took the list of platforms supported by Rust from https://doc.rust-lang.org/nightly/rustc/platform-support.htm... and those supported by Linux from https://docs.kernel.org/arch/index.html , cleaned them up so they can be compared like for like and then put them into this python script: linux = { "alpha", "arc", "arm", "aarch64", "csky", "hexagon", "loongarch", "m68k", "microblaze", "mips…

It’s an interesting list from the perspective of what kind of project Linux is. Things like PA-RISC and Alpha were dead even in the 90s (thanks to the successful Itanium marketing push convincing executives not to invest in their own architectures), and SuperH was only relevant in the 90s due to the Dreamcast pushing volume. That creates an interesting dynamic where Linux as a hobbyist OS has people who want to suppo…

There was a time when it came to 64 bit support Alpha really was the only game in town where you could buy a server without adding a sixth zero to the bill. It was AMD, not Itanium that killed Alpha.
Post reply on HN