Rust in the kernel is no longer experimental

962 pointsposted 2 months ago
by rascul

490 Comments

weinzierl

2 months ago

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 going back to a C only Linux.

pta2002

2 months ago

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

embedding-shape

2 months ago

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

pta2002

2 months ago

Yep, that's what I'm referring to.

For now there aren't many popular drivers that use Rust, but there are currently 3 in-development GPU drivers that use it, and I suspect that when those get merged that'll be the real point of no return:

- Asahi Linux's driver for Apple GPUs - https://rust-for-linux.com/apple-agx-gpu-driver

- The Nova GPU driver for NVIDIA GPUs - https://rust-for-linux.com/nova-gpu-driver

- The Tyr GPU driver for Arm Mali GPUs - https://rust-for-linux.com/tyr-gpu-driver

I suspect the first one of those to be actually used in production will be the Tyr driver, especially since Google's part of it and they'll probably want to deploy it on Android, but for the desktop (and server!) Linux use-case, the Nova driver is likely to be the major one.

jabl

2 months ago

I believe Google has developed a Rust implementation of the binder driver which was recently merged, and they are apparently planning to remove the original C implementation. Considering binder is essential for Android that would be a major step too.

jackokring

2 months ago

I can confirm that the ChromeOS debian container now has defaulted to turn off GPU acceleration, perhaps to turn on other acceleration on this Mali.

stusmall

2 months ago

You can force a panic with echo c | /proc/sysrq-trigger

krick

2 months ago

This is so cool! I love things like that, it feels like fresh air after years and years of anachronistic retro-vibes that seem to be a part of C-programming culture.

udev4096

2 months ago

Arch never failed me. The only time I remember it panicked was when I naively stopped an upgrade in the middle which failed to generate initramfs but quickly fixed it by chroot'ing and running mkinitcpio. Back up in no time

tremon

2 months ago

> I'm looking forward to distros shipping a default kernel with Rust support enabled

What does this mean? The kernel has no specific support for Rust userspace -- the syscall API does not suddenly change because some parts of the kernel are compiled with rustc.

steveklabnik

2 months ago

They aren’t talking about userspace.

As I understand it, the kernel has a flag, no by default, to enable building rust code as part of the kernel. They’re saying they’d like to see a distributed choosing to default this flag to yes for the kernels they build.

GuB-42

2 months ago

Will it be possible until Rust gets full GCC support, with all its platforms?

EMM_386

2 months ago

I think Fedora 43 is compiled with CONFIG_RUST=y.

mos87

2 months ago

This is genuinely funny. In a dark way but still made me chuckle. Thanks.

rustoleum69

2 months ago

[flagged]

TazeTSchnitzel

2 months ago

Because someday the programming state of the art must advance beyond 1970, and someday we must stop introducing new memory safety bugs that cause horrific vulnerabilities, and for kernel code we don't have the luxury of recompiling everything with garbage collection turned on as a band-aid for C's incurable defects.

bgwalter

2 months ago

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

josephg

2 months ago

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.

anal_reactor

2 months ago

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

bgwalter

2 months ago

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

Xylakant

2 months ago

Why? It depends on what you want to replace, but the Rust project has a long history of using tools written in other languages. Python is used a lot in build tooling, bors-ng was written in Elixir, llvm is written in c, ... gcc-rs doesn't contain a lot of rust code either, it's purely other languages according to https://github.com/Rust-GCC/gccrs

Fundamentally, if a tool is good and provides benefits then why not use it? You'll be met with concerns about maintainability if you just airdrop something written in Ada/SPARK, but that's fair - just as it was fair that the introduction of Rust in the linux kernel was indeed met with concerns about maintainability. It seems that those were resolved to the satisfcation of the group that decides things and the cost/benefit balance was considered net positive.

umanwizard

2 months ago

It doesn't detract from your main point, but LLVM is written in C++, not C.

Xylakant

2 months ago

Thanks for the correction.

kolektiv

2 months ago

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.

jciuqgfb

2 months ago

[flagged]

dralley

2 months ago

This is the 2nd throwaway account spamming this link, and we're supposed to see this as evidence of the Rust community acting poorly?

bmicraft

2 months ago

What are you implying? I ask because you aren't actually saying anything yourself.

Xylakant

2 months ago

How is the drive-by statement of a random GH account with 9 followers representative of any community. What's the point you're trying to make? That there's people with shitty behavior in the Rust community? No surprise here, there are. That there's trolls out there that just do this for fun? It's the internet! I hope that doesn't surprise anyone by now.

biqijf

2 months ago

Does this image count as significant tribalism in parts of the Rust community?

https://github.com/microsoft/typescript-go/discussions/411#d...

Taken from the above Github discussion regarding Go and Typescript.

https://imgur.com/a/efdIuWb

Xylakant

2 months ago

How is the one comment from a GH account with 18 followers, no contribution to the Rust project (or any Rust based project at all) and mostly contributions to javascript projects in any way representative of the Rust community? Especially taken out of context - in context it seem like a failed(?) attempt at humor or sarcasm.

Do I treat your post from an obvious throwaway account created 13 minutes ago as somehow representative of the C community or the Linux kernel community or for that matter as representative of any community at all?

Come on, please. There's a ton of things that I consider worth of critisicm in the Rust community, but make a better case.

LexiMax

2 months ago

> Do I treat your post from an obvious throwaway account created 13 minutes ago as somehow representative of the C community or the Linux kernel community or for that matter as representative of any community at all?

For all we know it could be the same person behind both the GitHub post and the Hacker News throwaway you're speaking to.

iurbwdj

2 months ago

[flagged]

josephg

2 months ago

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.

bgwalter

2 months ago

[flagged]

marcusb

2 months ago

galangalalgol

2 months ago

Add in theseus, tock, hubris, and hermit-os. That is just the non academic ones. As for why none of them are widely used? Drivers. It wasn't that long ago redox didn't even support usb devices. The linux kernel is a giant mashup of oodles of drivers.

bgwalter

2 months ago

The "provide value" argument can be used for anything. Modern software politics and foundation sponsorship pressure are so complex that this argument may not even be true.

It may be true in this case, but certainly you have seen corporate bloat being added to "open" source projects before.

embedding-shape

2 months ago

> Modern software politics and foundation sponsorship pressure are so complex that this argument may not even be true.

May not, or may yes. As far as I know with my own interactions with the Linux kernel community, is that it's very different from typical "modern software politics", at least different enough that I'd make the claim they're special from the other communities.

If there is any community I'd assume makes most of their choices disregarding politics or pressures and purely on technical measures, it would be the Linux kernel community. With that said, no person nor community is perfect, but unless there is some hard evidence pointing to that the Linux people were forced to accept Rust into the kernel for whatever reason, then at least I'd refrain from believing in such theories.

_fe

2 months ago

> If rust didn’t provide value to the Linux kernel, there’s no way it would have made out of the experimental phase.

That’s “appeal to authority” fallacy.

josephg

2 months ago

You're right that I'm appealing to authority, but that doesn't make my argument invalid.

The people who decided rust has value in the kernel are linux kernel developers. Ie, traditional C developers who see value in using rust in linux. Rust in linux has caused plenty of headaches. If rust didn't add commensurate value to make the trouble worth it, it wouldn't be getting adopted.

keybored

2 months ago

Pointing out that something was iterated upon and adopted in the place it was introduced is now a fallacy, amazing.

keybored

2 months ago

- Rust is invading the Linux Kernel

- Actually, The collective Linux Kernel found that it was good enough to graduate from the experimental ph—

- Aha! You are appealing to the authority of the Linux Kernel. That’s a fallacy.

zaphar

2 months ago

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.

pjmlp

2 months ago

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.

zaphar

2 months ago

for a project like unix at the time and even linux now I think "having fun" is absolutely one of their needs.

leftyspook

2 months ago

I think when Fish shell announced the Rust rewrite, they especially highlit that, in the form of "being more attractive to contributors" as one of the reasons.

g947o

2 months ago

"invading"

I'm sure your choice of words helps the discussion.

MSFT_Edging

2 months ago

Back when the primary consumers of the kernel were other researchers. Not billions of machines running our society.

drekipus

2 months ago

the kernel is the value part, not the language that the kernel is written in

g947o

2 months ago

I believe Linus responded to this very question. I recommend that you read through his email.

Basically, technology evolves, and you or anyone else can't stop that just because you don't like it for whatever nonsense (non technical) reason.

linuxfax

2 months ago

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

Yossarrian22

2 months ago

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

g947o

2 months ago

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

red-iron-pine

2 months ago

cuz if you do you're about to make a lot of money gambling on or shorting AI...

mainecoder

2 months ago

All I know is that RUST will lose skill issue and C will win

7bit

2 months ago

Going off on the name makes your entire question and argument subjective and useless in a constructive discussion.

_fe

2 months ago

In-general it seems that Rust proponents want ease and modernity to replace the ability to do the same in C better, with more control and intent, and with better results.

Rust is less tight. That’s fine for an application, but the kernel is used by everyone who uses Linux.

Rustians disparage C because it doesn’t have Rust behavior.

Why must the kernel have Rust behavior?

timschmidt

2 months ago

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

freeopinion

2 months ago

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.

albuic

2 months ago

So should the tools.

N_Lens

2 months ago

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

trueno

2 months ago

wasn't there like a drive by maintainer rejection of something rust related that kind of disrupted the asahi project ? i can't say i followed the developments much but i do recall it being some of that classic linux kernel on broadway theater. i also wonder if that was a first domino falling of sorts for asahi, i legitimately can't tell if that project lives on anymore

iurbwdj

2 months ago

It involved large parts of the Rust community, and the famous Rust developer Hector Martin (with an alter ego of Asahi Lina, a female vtuber, which he appears irrationally embarrassed about), harassing others.

Even Linus Torvalds called out Hector Martin.

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

> On Thu, 6 Feb 2025 at 01:19, Hector Martin <marcan@marcan.st> wrote:

> > If shaming on social media does not work, then tell me what does, because I'm out of ideas.

> How about you accept the fact that maybe the problem is you.

> You think you know better. But the current process works.

> It has problems, but problems are a fact of life. There is no perfect.

> However, I will say that the social media brigading just makes me not want to have anything at all to do with your approach.

> Because if we have issues in the kernel development model, then social media sure as hell isn't the solution. The same way it sure as hell wasn't the solution to politics.

> Technical patches and discussions matter. Social media brigading - no than\k you.

> Linus

https://archive.md/uLiWX

https://archive.md/rESxe

CursedSilicon

2 months ago

Is there any evidence "Asahi Lina" is Hector?

glenstein

2 months ago

Thank you for asking this. It was presented matter of fact and I would not have appreciated that it was something less than settled. The best I can find from googling was rumors and speculation (insert comment in reply with more rumors and speculation). I also don't necessarily think it means someone is a Bad Guy if true. I want people to be able to have anonymous alter egos online if that's what they want and they're not doing any harm.

xphos

2 months ago

Isn't Asahi Lina Married to some other japanese Vtubber now? I mean maybe you'd fake all that but I doubt it. Both are more likely real people who are different. The people have totally different eccentricties its really hard to fake that type difference for a long time.

[source] https://x.com/Lina_Hoshino/status/1862840998897861007

amiga386

2 months ago

There is. You can easily find by googling "hector martin" "asahi lina" and you will soon find a pile of obsessively archived evidence.

My view, now that Hector has resigned from the LKML both as himself and as Lina, is there is no problem any more. If Hector wants to project a persona, or decide his identity is the persona, or maybe multiple personas, that is fine on social media. People do that. So long as he's not sockpuppeting Linux kernel maintenance, it's fine.

CursedSilicon

2 months ago

Instead of prompting me to "do my own research" (spoiler: The 'evidence' is lacking and is mostly tedious speculation) you could provide something more compelling

mos87

2 months ago

It all depends on the value each and every person brings. Otherwise, I'd rather chose to work with a normal colleague rather than with someone who can't keep his obsessive schizophrenia out of work process. I guess this should be the baseline.

bayindirh

2 months ago

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/item?id=43043312

chippiewill

2 months ago

That was a single message in a very large thread. It absolutely was not just about code quality.

iknowstuff

2 months ago

Yes.

Linus Torvalds rips into Hellwig for blocking Rust for Linux:

https://lore.kernel.org/rust-for-linux/CAHk-=wgLbz1Bm8QhmJ4d...

    The fact is, the pull request you objected to DID NOT TOUCH THE DMA LAYER AT ALL.
    It was literally just another user of it, in a completely separate subdirectory, that didn't change the code you maintain in _any_ way, shape, or form.
    I find it distressing that you are complaining about new users of your code, and then you keep bringing up these kinds of complete garbage arguments.
    Honestly, what you have been doing is basically saying "as a DMA maintainer I control what the DMA code is used for".
    And that is not how *any* of this works.
The other person who replied to you is purposefully referencing a different incident.

drtgh

2 months ago

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

    << Alex Gaynor recently announced he is formally stepping down as one of the maintainers of the Rust for Linux kernel code with the removal patch now queued for merging in Linux 6.19. Alex Gaynor was one of the original developers to experiment with Rust code for Linux kernel modules. He's drifted away from Rust Linux kernel development for a while due to lack of time and is now formally stepping down as a listed co-maintainer of the Rust code. After Wedson Almeida Filho stepped down last year as a Rust co-maintainer, this now leaves Rust For Linux project leader Miguel Ojeda as the sole official maintainer of the code while there are several Rust code reviewers. >>

mainecoder

2 months ago

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

meindnoch

2 months ago

"Yay, we got Rust in the Kernel! ^_^ Ok, now it's your code! Bye!"

veber-alex

2 months ago

1. He left before Rust stopped being experimental.

2. Maintainers come and go all the time, this is how open source works.

3. The only reason Phoronix reports on this is because anytime they mention Rust it attracts rage bait clicks, for example, your comment.

vablings

2 months ago

Then another maintainer will take care of it? This is how kernel development works....

dlahoda

2 months ago

high quality educational material

mos87

2 months ago

Due process including fitness for purpose assessment isn't "resistance".

dcrazy

2 months ago

Does the removal of “experimental” now mean that all maintainers are now obligated to not break Rust code?

chippiewill

2 months ago

I believe the removal of the "experimental" nomenclature is just an indication that Rust is "here to stay" in the kernel (which essentially means that developers can have confidence investing in writing Rust based drivers).

The overall rules haven't changed.

Strictly speaking they've always been obligated to not break the Rust code, but the R4L developers have agreed to fix it on some subsystems behalf IIRC so Rust can be broken in the individual subsystem trees. But I think it's been the case all along that you can't send it to Linus if it breaks the Rust build, and you probably shouldn't send it to linux-next either.

veidelis

2 months ago

Is rust code part of user space?

josephg

2 months ago

This is the Linux kernel. User space can do whatever it wants.

Muromec

2 months ago

That's a woosh moment

dxroshan

2 months ago

Projects like GNOME are increasingly using Rust.

veidelis

2 months ago

From kernel side, I meant - I wasn't clear. Now I understand what's the meaning of "don't break rust code". Happy that rust's journey in the kernel is successful so far. The pace seems strong.

mort96

2 months ago

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

simonask

2 months ago

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 experiment ran. In other words, the Rust code was allowed to be temporarily broken while the Rust maintainers fixed up uses of APIs that were changed in C code.

Imustaskforhelp

2 months ago

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

dwattttt

2 months ago

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 discussed ~now.

jacquesm

2 months ago

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.

amiga386

2 months ago

Does this mean that all architectures that Linux supports but Rust doesn't are straight in the bin?

vincentkriek

2 months ago

No, Rust is in the kernel for driver subsystems. Core linux parts can't be written in Rust yet for the problem you mention. But new drivers *can* be written in Rust

bmicraft

2 months ago

Which ones would that be?

muvlon

2 months ago

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", "mips64", "nios2",
    "openrisc", "parisc", "powerpc", "powerpc64", "riscv",
    "s390", "s390x", "sh", "sparc", "sparc64", "x86", "x86_64",
    "xtensa" }
  
  rust = { "arm", "aarch64", "amdcgn", "avr", "bpfeb", "bpfel",
    "csky", "hexagon", "x86", "x86_64", "loongarch", "m68k",
    "mips", "mips64", "msp430", "nvptx", "powerpc", "powerpc64",
    "riscv", "s390x", "sparc", "sparc64", "wasm32", "wasm64",
    "xtensa" }
  
  print(f"Both: {linux.intersection(rust)}")
  print(f"Linux, but not Rust: {linux.difference(rust)}")
  print(f"Rust, but not Linux: {rust.difference(linux)}")
Which yields:

Both: {'aarch64', 'xtensa', 'sparc', 'm68k', 'mips64', 'sparc64', 'csky', 'riscv', 'powerpc64', 's390x', 'x86', 'powerpc', 'loongarch', 'mips', 'hexagon', 'arm', 'x86_64'}

Linux, but not Rust: {'nios2', 'microblaze', 'arc', 'openrisc', 'parisc', 's390', 'alpha', 'sh'}

Rust, but not Linux: {'avr', 'bpfel', 'amdcgn', 'wasm32', 'msp430', 'bpfeb', 'nvptx', 'wasm64'}

Personally, I've never used a computer from the "Linux, but not Rust" list, although I have gotten close to a DEC Alpha that was on display somewhere, and I know somebody who had a Sega Dreamcast (`sh`) at some point.

bmicraft

2 months ago

Well, GCC 15 already ended support for the nios2 soft-core. The successor to it is Nios V which runs RISC-V. If users want us update the kernel, they'll also need to update their FPGA.

Microblaze also is a soft-core, based on RISC-V, presumably it could support actual RISC-V if anyone cared.

All others haven't received new hardware within the last 10 years, everybody using these will already be running an LTS kernel on there.

It looks like there really are no reasons not to require rust for new versions of the kernel from now on then!

acdha

2 months ago

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 support those architectures, but Linux as the dominant server and mobile OS doesn’t want to hold back 99.999999+% of the running kernels in the world.

seba_dos1

2 months ago

You probably shouldn't include Rust's Tier 3 in this list. If you have to, at least make it separate.

Palomides

2 months ago

some of the platforms on that list are not supported well enough to say they actually have usable rust, e.g m68k

NoGravitas

2 months ago

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

amiga386

2 months ago

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.

Lariscus

2 months ago

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

eru

2 months ago

And more specifically which ones that anyone would use a new kernel on?

kykat

2 months ago

Some people talk about 68k not being supported being a problem

pornel

2 months ago

m68k Linux is supported by Rust, even in the LLVM backend.

Rust also has an experimental GCC-based codegen backend (based on libgccjit (which isn't used as a JIT)).

So platforms that don't have either LLVM nor recent GCC are screwed.

hexo

2 months ago

Yes. Cooked.

epohs

2 months ago

This seems big. Is this big?

account42

2 months ago

It's a big dependency added alright.

cromka

2 months ago

Is that all it is?

shevy-java

2 months ago

Well - what is actually written in Rust so far that is in the kernel?

jlrubin

2 months ago

@dang title has been changed to "The (successful) end of the kernel Rust experiment", since there were complaints in the articles comments from the committee members that that was a sensationalization of what actually happened.

9rx

2 months ago

Isn't successful already implied?

Unsuccessful experiments have no end unless motivation to keep trying runs out — but Rust seems to have no end to motivation behind it. Besides, if it were to ever reach the point of there being no remaining motivation, there would be no remaining motivation for those who have given up to announce that they have given up, so we'd never see the headline to begin with.

dang

2 months ago

We've done unsuccessful experiments on HN over the years, in the sense that they failed to achieve anything we'd hoped for and caused enough damage that we had to call them off.

9rx

2 months ago

Isn't that ultimately a loss of motivation? With enough buy in there would be a lot of reason to keep iterating towards the desired outcome despite any setbacks. That is the nature of experiments, after all. Things going horribly wrong while you are in the iteration process is an expected part of experimentation.

Imagine a world where the Rust experiment hand't been going well. There is absolutely nothing stopping someone from keeping at it to prove why Rust should be there. The experiment can always live as long as someone wants to keep working on it. Experiments fundamentally can only end when successful, or when everyone gives up (leaving nobody to make the announcement).

That said, consider me interested to read the announcements HN has about those abandoned experiments. Where should I look to find them?

jwatte

2 months ago

"Linux kernel devs tried Rust in the kernel -- you won't BELIEVE the reaction!"

cratermoon

2 months ago

One weird trick kernel developers HATE

ls-a

2 months ago

Use linux because it now has Rust kernels. Great marketing

Eikon

2 months ago

I'm mostly interested in being able to interact with the vfs and build a 9p rust client (in addition to the current v9fs) to support my 9p server [0].

Does anyone know what's the current state / what is the current timeline for something like this to be feasible?

[0] https://github.com/Barre/ZeroFS

irusensei

2 months ago

Happy to hear. We should embrace new things.

integralid

2 months ago

Why? New things are less stable, immature and require a lot of effort to understand.

Don't get me wrong, rust in the kernel is good, because the memory safety and expressiveness it brings makes it worth it DESPITE the huge effort required to introduce it. But I disagree that new things are inherently good.

dwattttt

2 months ago

> I disagree that new things are inherently good.

New things aren't automatically good. But you don't get new things that are good without trying new things.

By avoiding new things, you're guaranteed to not experience less stable, immature, and confusing things. But also any new things that are good.

t43562

2 months ago

Great. Python in the kernel!

qwm

2 months ago

What does this practically mean for Linux? Will core parts of it depend on Rust? How closely linked are drivers?

Rust in Linux always worried me because there is currently only one stable backend (LLVM) and only one compiler implementation that doesn't yet have a spec. I like that you can at least compile Linux with Clang and GCC, but there aren't even two options for Rust right now.

shevy-java

2 months ago

So what is written in Rust so far therein?

dxroshan

2 months ago

Mostly GPU drivers

ramon156

2 months ago

Rightfully so, its probably the place where you'll het most ROI

weebull

2 months ago

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.

rzerowan

2 months ago

Hmm seeing as this looks to be the path forward as far as inkernel Linux drivers are concerned , adnfor BSDs like FreeBSD that port said drivers to their own kernel. Are we going to see the same oxidation of the BSD's or resistance and bifurcation.

ykonstant

2 months ago

I need to check the rust parts of the kernel, I presume there is significant amounts of unsafe. Is unsafe Rust a bit better nowadays? I remember a couple of years ago people complained that unsafe is really hard to write and very "un-ergonomic".

jenadine

2 months ago

The idea is that most of the unsafe code to interact with the C API of the kernel is abstracted in the kernel crate, and the drivers themselves should use very little amount of unsafe code, if any.

IshKebab

2 months ago

I don't think unsafe Rust has gotten any easier to write, but I'd also be surprised if there was much unsafe except in the low-level stuff (hard to write Vec without unsafe), and to interface with C which is actually not hard to write.

Mostly Rust has been used for drivers so far. Here's the first Rust driver I found:

https://github.com/torvalds/linux/blob/2137cb863b80187103151...

It has one trivial use of `unsafe` - to support Send & Sync for a type - and that is apparently temporary. Everything else uses safe APIs.

johncolanduoni

2 months ago

Drivers are interesting from a safety perspective, because on systems without an IOMMU sending the wrong command to devices can potentially overwrite most of RAM. For example, if the safe wrappers let you write arbitrary data to a PCIe network card’s registers you could retarget a receive queue to the middle of a kernel memory page.

josephg

2 months ago

> if the safe wrappers let you write arbitrary data to a PCIe network card’s registers

Functions like that can and should be marked unsafe in rust. The unsafe keyword in rust is used both to say “I want this block to have access to unsafe rust’s power” and to mark a function as being only callable from an unsafe context. This sounds like a perfect use for the latter.

umanwizard

2 months ago

In normal user-mode rust, not running inside the kernel at all, you can open /dev/mem and write whatever you want to any process's memory (assuming you are root). This does not require "unsafe" at all.

Another thing you can do from rust without "unsafe": output some buggy source code that invokes UB in a language like C to a file, then shell out to the compiler to compile that file and run it.

jdub

2 months ago

    unsafe {
        // this is normal Rust code, you can write as much of it as you like!
        // (and you can bend some crucial safety rules)
        // but try to limit and document what you put inside an unsafe block.
        // then wrap it in a safe interface so no one has to look at it again
    }

Cthulhu_

2 months ago

Wouldn't that be by design? If it isn't pleasant, people will avoid using it if they can.

(but as others pointed out, unsafe should only be used at the 'edges', the vast majority should never need to use unsafe)

m00dy

2 months ago

C++ devs are spinning in their graves now.

pjmlp

2 months ago

Why should they?

Other platforms don't have a leader that hates C++, and then accepts a language that is also quite complex, even has two macro systems of Lisp like wizardy, see Serde.

OSes have been being written with C++ on the kernel, since the late 1990's, and AI is being powered by hardware (CUDA) that was designed specifically to accomodate C++ memory model.

Also Rust compiler depends on a compiler framework written in C++, without it there is no Rust compiler, and apparently they are in no hurry to bootstrap it.

maximilianburke

2 months ago

> Also Rust compiler depends on a compiler framework written in C++

As does the GCC C compiler.

blub

2 months ago

C++ devs don’t care what the Linux kernel’s written in.

But I did see an interesting comment from another user here which also reflects my feelings: Rust is pushed aggressively with different pressure tactics. Another comment pointed out that Rust is not about Rust programmers writing more Rust, but “Just like a religion it is about what other people should do.”.

I’ve been reading about this Rust-in-the-kernel topic since the beginning, without getting involved. One thing that struck me is the obvious militant approach of the rustafarians, criticizing existing maintainers (particularly Ts’o and other objectors), implying they’re preventing progress or out of touch.

The story feels more like a hostile takeover attempt than technology. I also think that many C or C++ programmers don’t bother posting in this topics, so they’re at least partially echo chambers.

qwm

2 months ago

That's how it feels to me. There are crucial issues, namely that there is no spec and there is only one implementation. I don't know why Linus is ok with this. I'd be fine with it if those issues were resolved, but they aren't.

aw1621107

2 months ago

> There are crucial issues, namely that there is no spec and there is only one implementation. I don't know why Linus is ok with this.

I can try to provide a (weak) steelman argument:

Strictly speaking, neither the lack of a spec nor a single implementation have been blockers for Linux's use of stuff, either now or in the past. Non-standard GCC extensions and flags aren't exactly rare in the kernel, and Linus has been perfectly fine with the single non-standard implementation of those. Linus has also stated in the past (paraphrasing) that what works in practice is more important than what standards dictate [0]. Perhaps Linus feels that what Rust does in practice is good enough, especially given its (currently) limited role in the kernel.

Granted, not having a spec for individual flags/features is not equivalent to not having a spec for the language, so it's not the strongest argument as I said. I do think there's a point nestled in there though - perhaps what happens on the ground is the most important factor. It probably helps that there is work being done on both the spec and multiple implementation fronts.

[0]: https://lkml.org/lkml/2018/6/5/769

sho_hn

2 months ago

Or installing Haiku!

RGBCube

2 months ago

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

pjmlp

2 months ago

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

josephg

2 months ago

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.

lII1lIlI11ll

2 months ago

The kernel is mostly C code, not C++.

9rx

2 months ago

Hence the previous comment. If Linux was (partially) written in C++, it would no longer work.

shmerl

2 months ago

The title sounded worse than it is.

markus_zhang

2 months ago

Not a system programmer -- at this point, does C hold any significant advantage over Rust? Is it inevitable that everything written in C is going to be gradually converted to safer languages?

jcranmer

2 months ago

C currently remains the language of system ABIs, and there remains functionality that C can express that Rust cannot (principally bitfields).

Furthermore, in terms of extensions to the language to support more obtuse architecture, Rust has made a couple of decisions that make it hard for some of those architectures to be supported well. For example, Rust has decided that the array index type, the object size type, and the pointer size type are all the same type, which is not the case for a couple of architectures; it's also the case that things like segmented pointers don't really work in Rust (of course, they barely work in C, but barely is more than nothing).

raggi

2 months ago

That first sentence though. Bitfields and ABI alongside each other.

Bitfield packing rules get pretty wild. Sure the user facing API in the language is convenient, but the ABI it produces is terrible (particularly in evolution).

mjevans

2 months ago

I would like a revision to bitfields and structs to make them behave the way a programmer things, with the compiler free to suggest changes which optimize the layout. As well as some flag that indicates the compiler should not, it's a finalized structure.

vlovich123

2 months ago

Can you expand on bitfields? There’s crates that implement bitfield structs via macros so while not being baked into the language I’m not sure what in practice Rust isn’t able to do on that front.

structural

2 months ago

Now, try and use two or more libraries that expose data structures with bitfields, and they have all chosen different crates for this (or even the same crate but different, non-ABI-compatible-versions of it).

There's a ton of standardization work that really should be done before these are safe for library APIs. Mostly fine to just write an application that uses one of these crates though.

ZeWaka

2 months ago

Yeah, not sure what they're saying... I use bitfields in multiple of my rust projects using those macros.

kbolino

2 months ago

I'm genuinely surprised that usize <=> pointer convertibility exists. Even Go has different types for pointer-width integers (uintptr) and sizes of things (int/uint). I can only guess that Rust's choice was seen as a harmless simplification at the time. Is it something that can be fixed with editions? My guess is no, or at least not easily.

jcranmer

2 months ago

There is a cost to having multiple language-level types that represent the exact same set of values, as C has (and is really noticeable in C++). Rust made an early, fairly explicit decision that a) usize is a distinct fundamental type from the other types, and not merely a target-specific typedef, and b) not to introduce more types for things like uindex or uaddr or uptr, which are the same as usize on nearly every platform.

Rust worded in its initial guarantee that usize was sufficient to roundtrip a pointer (making it effectively uptr), and there remains concern among several of the maintainers about breaking that guarantee, despite the fact that people on the only target that would be affected basically saying they'd rather see that guarantee broken. Sort of the more fundamental problem is that many crates are perfectly happy opting out of compiling for weirder platform--I've designed some stuff that relies on 64-bit system properties, and I'd rather like to have the ability to say "no compile for you on platform where usize-is-not-u64" and get impl From<usize> for u64 and impl From<u64> for usize. If you've got something like that, it also provides a neat way to say "I don't want to opt out of [or into] compiling for usize≠uptr" and keeping backwards compatibility.

If you want to see some long, gory debates on the topic, https://internals.rust-lang.org/t/pre-rfc-usize-is-not-size-... is a good starting point.

aw1621107

2 months ago

> Is it something that can be fixed with editions? My guess is no, or at least not easily.

Assuming I'm reading these blog posts [0, 1] correctly, it seems that the size_of::<usize>() == size_of::<*mut u8>() assumption is changeable across editions.

Or at the very least, if that change (or a similarly workable one) isn't possible, both blog posts do a pretty good job of pointedly not saying so.

[0]: https://faultlore.com/blah/fix-rust-pointers/#redefining-usi...

[1]: https://tratt.net/laurie/blog/2022/making_rust_a_better_fit_...

gf000

2 months ago

> that C can express that Rust cannot

The reverse is probably more true, though. Rust has native SIMD support for example, while in standard C there is no way to express that.

'C is not a low-level language' is a great blog post about the topic.

exDM69

2 months ago

> Rust has native SIMD support

std::simd is nightly only.

> while in standard C there is no way to express that.

In ISO Standard C(++) there's no SIMD.

But in practice C vector extensions are available in Clang and GCC which are very similar to Rust std::simd (can use normal arithmetic operations).

Unless you're talking about CPU specific intrinsics, which are available to in both languages (core::arch intrinsics vs. xmmintrin.h) in all big compilers.

ndiddy

2 months ago

AFAIK std::simd is still nightly only. You can use the raw intrinsics in std::arch, but that's not any better than "#include <immintrin.h>".

kristianp

2 months ago

So use the fairly common SIMD extensions in C, that's not much of an argument.

dataflow

2 months ago

In what architecture are those types different? Is there a good reason for it there architecturally, or is it just a toolchain idiosyncrasy in terms of how it's exposed (like LP64 vs. LLP64 etc.)?

jcranmer

2 months ago

CHERI has 64-bit object size but 128-bit pointers (because the pointer values also carry pointer provenance metadata in addition to an address). I know some of the pointer types on GPUs (e.g., texture pointers) also have wildly different sizes for the address size versus the pointer size. Far pointers on segmented i386 would be 16-bit object and index size but 32-bit address and pointer size.

There was one accelerator architecture we were working that discussed making the entire datapath be 32-bit (taking less space) and having a 32-bit index type with a 64-bit pointer size, but this was eventually rejected as too hard to get working.

yencabulator

2 months ago

> For example, Rust has decided that the array index type, the object size type, and the pointer size type are all the same type, [...]

Not really, at least not anymore: https://doc.rust-lang.org/std/ptr/index.html#provenance

This is also how Rust will work on CHERI. You can run your pointer-fiddling code in Miri today to check that you're following the rules.

throw_a_grenade

2 months ago

Also you can't do self-referential strutcs.

Double-linked lists are also pain to implement, and they're are heavily used in kernel.

K0nserv

2 months ago

> Also you can't do self-referential strutcs.

You mean in safe rust? You can definitely do self-referential structs with unsafe and Pin to make a safe API. Heck every future generated by the compiler relies on this.

qwm

2 months ago

Correct. C has a mostly standardized ABI, Rust does not. C has a spec, Rust does not. That matters in things like kernels.

drnick1

2 months ago

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.

jcranmer

2 months ago

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, and BASIC-with-an-asterisk, are the only languages to really have done so), and Perl is the only one I would risk money on departing in my lifetime.

I do firmly expect that we're less than a decade out from seeing some reference algorithm be implemented in Rust rather than C, probably a cryptographic algorithm or a media codec. Although you might argue that the egg library for e-graphs already qualifies.

qalmakka

2 months ago

We're already at the point where in order to have a "decent" desktop software experience you _need_ Rust too. For instance, Rust doesn't support some niche architectures because LLVM doesn't support them (those architectures are now exceedingly rare) and this means no Firefox for instance.

account42

2 months ago

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

tormeh

2 months ago

A system only needs one programming language to be useful, and when there's only one it's basically always C.

teruakohatu

2 months ago

> 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

Java, really? I don’t think Java has been essential for a long time.

Is Perl still critical?

eru

2 months ago

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

I suspect what we are going to see isn't so much Rust making it through that door, but LLVM. Rust and friends will come along for the ride.

bmicraft

2 months ago

Removing Java from my desktop Arch system only prompts to remove two gui apps I barely use. I could do it right now and not notice for months.

oblio

2 months ago

Even Perl... It's not in POSIX (I'm fairly sure) and I can't imagine there is some critical utility written in Perl that can't be rewritten in Python or something else (and probably already has been).

As much as I like Java, Java is also not critical for OS utilities. Bash shouldn't be, per se, but a lot of scripts are actually Bash scripts, not POSIX shell scripts and there usually isn't much appetite for rewriting them.

jfjfnfjrh

2 months ago

Debian and Ubuntu enter the chat.....

pantalaimon

2 months ago

I don't think Perl comes pre installed on any modern system anymore

brokencode

2 months ago

What other newfangled alternative to C was ever adopted in the Linux kernel?

I have no doubt C will be around for a long time, but I think Rust also has a lot of staying power and won’t soon be replaced.

ottah

2 months ago

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

vlovich123

2 months ago

I can’t think of many real world production systems which don’t have a rust target. Also I’m hopeful the GCC backend for rustc makes some progress and can become an option for the more esoteric ones

phire

2 months ago

There aren't really any "systems programming" platforms anywhere near production that doesn't have a workable rust target.

It's "embedded programming" where you often start to run into weird platforms (or sub-platforms) that only have a c compiler, or the rust compiler that does exist is somewhat borderline. We are sometimes talking about devices which don't even have a gcc port (or the port is based on a very old version of gcc). Which is a shame, because IMO, rust actually excels as an embedded programming language.

Linux is a bit marginal, as it crosses the boundary and is often used as a kernel for embedded devices (especially ones that need to do networking). The 68k people have been hit quite hard by this, linux on 68k is still a semi-common usecase, and while there is a prototype rust back end, it's still not production ready.

MobiusHorizons

2 months ago

It's mostly embedded / microcontroller stuff. Things that you would use something like SDCC or a vendor toolchain for. Things like the 8051, stm8, PIC or oddball things like the 4 cent Padauk micros everyone was raving about a few years ago. 8051 especially still seems to come up from time to time in things like the ch554 usb controller, or some NRF 2.4ghz wireless chips.

pjmlp

2 months ago

Commercial embedded OSes, game consoles, for example.

thayne

2 months ago

> very slow compilation times

That isn't always the case. Slow compilations are usually because of procedural macros and/or heavy use of generics. And even then compile times are often comparable to languages like typescript and scala.

timow1337

2 months ago

Compared to C, rust compiles much slower. This might not matter on performant systems, but when resources are constrained you definitely notice it. And if the whole world is rewritten in Rust, this will have a non-significant impact on the total build time of a bunch of projects.

Yiin

2 months ago

typescript transpilation to js is nearly instant, it's not comparable

AceJohnny2

2 months ago

> My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative.

if only due to the Lindy Effect

https://en.wikipedia.org/wiki/Lindy_effect

qwm

2 months ago

Sure, but the reason tends to be that if you want something to run everywhere, C is your best bet.

blintz

2 months ago

Doesn’t rustc emit LLVM IR? Are there a lot of systems that LLVM doesn’t support?

aw1621107

2 months ago

rustc can use a few different backends. By my understanding, the LLVM backend is fully supported, the Cranelift backend is either fully supported or nearly so, and there's a GCC backend in the works. In addition, there's a separate project to create an independent Rust frontend as part of GCC.

Even then, there are still some systems that will support C but won't support Rust any time soon. Systems with old compilers/compiler forks, systems with unusual data types which violate Rust's assumptions (like 8 bit bytes IIRC)

loeg

2 months ago

There are a number of oddball platforms LLVM doesn't support, yeah.

einpoklum

2 months ago

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.

archargelod

2 months ago

One problem of Rust vs C, I rarely see mentioned is that Rust code is hard to work with from other languages. If someone writes a popular C library, you can relatively easily use it in your Java, D, Nim, Rust, Go, Python, Julia, C#, Ruby, ... program.

If someone writes a popular Rust library, it's only going to be useful to Rust projects.

With Rust I don’t even know if it’s possible to make borrow checking work across a language boundary. And Rust doesn't have a stable ABI, so even if you make a DLL, it’ll only work if compiled with the exact same compiler version. *sigh*

aw1621107

2 months ago

The reason you rarely hear that mentioned is because basically every programming language is hard to work with from other languages. The usual solution is to "just" expose a C API/ABI.

Of course, C API/ABIs aren't able to make full use of Rust features, but again, that also applies to basically every other language.

sophacles

2 months ago

Perhaps we can finally stop defining abis in terms of c structs!

mustache_kimono

2 months ago

> Every system under the Sun has a C compiler... My guess is that C will be around long after people will have moved on from Rust to another newfangled alternative.

This is still the worst possible argument for C. If C persists in places no one uses, then who cares?

jazzyjackson

2 months ago

I think you didn't catch their drift

C will continue to be used because it always has been and always will be available everywhere, not only places no one uses :/

johncolanduoni

2 months ago

You almost certainly have a bunch of devices containing a microcontroller that runs an architecture not targeted by LLVM. The embedded space is still incredibly fragmented.

That said, only a handful of those architectures are actually so weird that they would be hard to write a LLVM backend for. I understand why the project hasn’t established a stable backend plugin API, but it would help support these ancillary architectures that nobody wants to have to actively maintain as part of the LLVM project. Right now, you usually need to use a fork of the whole LLVM project when using experimental backends.

biorach

2 months ago

There are certain styles of programming and data structure implementations that end up requiring you to fight Rust at almost every step. Things like intrusive data structures, pointer manipulation and so on. Famously there is an entire book online on how to write a performant linked list in idiomatic Rust - something that is considered straightforward in C.

For these cases you could always use Zig instead of C

pjmlp

2 months ago

Given Zig's approach to safety, you can get the same in C with static and runtime analysis tools, that many devs keep ignoring.

Already setting the proper defaults on a Makefile would get many people half way there, without changing to language yet to be 1.0, and no use-after-free story.

metaltyphoon

2 months ago

> many devs keep ignoring

And thats why Zig don’t offer much. Devs will just ignore it.

wiz21c

2 months ago

it is not straightforward in rust because the linked list is inherently tricky to implement correctly. Rust makes that very apparent (and, yeah, a bit too apparent).

I know, a linked list is not exactly super complex and rust makes that a bit tough. But the realisation one must have is this: building a linked list will break some key assumptions about memory safety, so trying to force that into rust is just not gonna make it.

Problem is I guess that for several of us, we have forgotten about memory safety and it's a bit painful to have that remembered to us by a compiler :-)

delamon

2 months ago

Can you elaborate, what key assumptions about memory safety linked lists break? Sure, double linked lists may have non-trivial ownership, but that doesn't compromise safety.

yencabulator

2 months ago

Sure. Now import a useful performant B+tree in C from a reusable library, while enforcing type safety for your keys and values.

Lots of things C chose to use intrusive pointers and custom data structures for, you would program very differently in a different language.

I'm an old C neckbeard and I find Rust a great experience. Some of the arguments against it sound like people are complaining about how hard it is to run pushing a bicycle.

ViewTrick1002

2 months ago

Or just build a tested unsafe implementation as a library. For example the Linked List in the standard library.

https://doc.rust-lang.org/src/alloc/collections/linked_list....

biorach

2 months ago

Yeah, if you need a linked list (you probably don't) use that. If however you are one of the very small number of people who need fine-grained control over a tailored data-structure with internal cross-references or whatnot then you may find yourself in a world where Rust really does not believe that you know what you are doing and fights you every step of the way. If you actually do know what you are doing, then Zig is probably the best modern choice. The TigerBeetle people chose Zig for these reasons, various resources on the net explain their motivations.

mjlawson

2 months ago

I think that misses the point though. C trusts you to design your own linked list.

It also trusts your neighbor, your kid, your LLM, you, your dog, another linked list...

arbitrandomuser

2 months ago

what is an intrusive data structure?

ahartmetz

2 months ago

A container class that needs cooperation from the contained items, usually with special data fields. For example, a doubly linked list where the forward and back pointers are regular member variables of the contained items. Intrusive containers can avoid memory allocations (which can be a correctness issue in a kernel) and go well with C's lack of built-in container classes. They are somewhat common in C and very rare in C++ and Rust.

ajuc

2 months ago

A data structure that requires you to change the data to use it.

Like a linked list that forces you to add a next pointer to the record you want to store in it.

mmooss

2 months ago

Before we ask if almost all things old will be rewritten in Rust, we should ask if almost all things new are being written in Rust or other memory-safe languages?

Obviously not. When will that happen? 15 years? Maybe it's generational: How long before developers 'born' into to memory-safe languages as serious choices will be substantially in charge of software development?

buster

2 months ago

I don't know I tend to either come across new tools written in Rust, JavaScript or Python but relatively low amount of C. The times I see some "cargo install xyz" in a git repo of some new tool is definitely noticeable.

sho_hn

2 months ago

I'm a bit wary if this is hiding an agist sentiment, though. I doubt most Rust developers were 'born into' the language, but instead adopted it on top of existing experience in other languages.

mmooss

2 months ago

People can learn Rust at any age. The reality is that experienced people often are more hesitant to learn new things.

I can think of possible reasons: Early in life, in school and early career, much of what you work on is inevitably new to you, and also authorities (professor, boss) compel you to learn whatever they choose. You become accustomed to and skilled at adapting new things. Later, when you have power to make the choice, you are less likely to make yourself change (and more likely to make the junior people change, when there's a trade-off). Power corrupts, even on that small scale.

There's also a good argument for being stubborn and jaded: You have 30 years perfecting the skills, tools, efficiencies, etc. of C++. For the new project, even if C++ isn't as good a fit as Rust, are you going to be more efficient using Rust? How about in a year? Two years? ... It might not be worth learning Rust at all; ROI might be higher continuing to invest in additional elite C++ skills. Certainly that has more appeal to someone who knows C++ intimately - continue to refine this beautiful machine, or bang your head against the wall?

For someone without that investment, Rust might have higher ROI; that's fine, let them learn it. We still need C++ developers. Morbid but true, to a degree: 'Progress happens one funeral at a time.'

pjmlp

2 months ago

Sure there are plenty of them, hence why you seem remarks like wanting to use Rust but with a GC, or assigned to Rust features that most ML derived languages have.

lmm

2 months ago

> Obviously not

Is it obvious? I haven't heard of new projects in non-memory-safe languages lately, and I would think they would struggle to attract contributors.

jandrewrogers

2 months ago

New high-scale data infrastructure projects I am aware of mostly seem to be C++ (often C++20). A bit of Rust, which I’ve used, and Zig but most of the hardcore stuff is still done in C++ and will be for the foreseeable future.

It is easy to forget that the state-of-the-art implementations of a lot of systems software is not open source. They don’t struggle to attract contributors because of language choices, being on the bleeding edge of computer science is selling point enough.

pjmlp

2 months ago

Game development, graphics and VFX industry, AI tooling infrastructure, embedded development, Maker tools like Arduino and ESP32, compiler development.

mmooss

2 months ago

Out of curiosity, do the LLMs all use memory safe languages?

keyle

2 months ago

C is fun to write. I can write Rust, but I prefer writing C. I prefer compiling C, I prefer debugging C. I prefer C.

It's a bit like asking with the new mustang on the market, with airbags and traction control, why would you ever want to drive a classic mustang?

speedgoose

2 months ago

It’s okay to enjoy driving an outdated and dangerous car for the thrill because it makes pleasing noise, as long as you don’t annoy too much other people with it.

IshKebab

2 months ago

> I prefer debugging C

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

ykonstant

2 months ago

I prefer a billion dallars tax free, but here we are:(

account42

2 months ago

Do you also want some unicorns as well?

pjmlp

2 months ago

Yes it does, alongside C++, Rust isn't available everywhere.

There are industry standards based in C, or C++, and I doubt they will be adopting Rust any time soon.

POSIX (which does require a C compiler for certification), OpenGL, OpenCL, SYSCL, Aparavi, Vulkan, DirectX, LibGNM(X), NVN, CUDA, LLVM, GCC, Unreal, Godot, Unity,...

Then plenty of OSes like the Apple ecosystem, among many other RTOS and commercial endevours for embedded.

Also the official Rust compiler isn't fully bootstraped yet, thus it depends on C++ tooling for its very existence.

Which is why efforts to make C and C++ safer are also much welcomed, plenty of code out there is never going to be RIR, and there are domains where Rust will be a runner up for several decades.

Philpax

2 months ago

I agree with you for the most part, but it's worth noting that those standards can expose a C API/ABI while being primarily implemented in and/or used by non-C languages. I think we're a long way away from that, but there's no inherent reason why C would be a going concern for these in the Glorious RIIR Future:tm:.

StopDisinfo910

2 months ago

Depends of what you do.

Rust has a nice compiler-provided static analyzer using annotation to do life time analysis and borrow checking. I believe borrow checking to be a local optima trap when it comes to static analysis and finds it often more annoying to use than I would like but I won't argue it's miles better than nothing.

C has better static analysers available. They can use annotations too. Still, all of that is optional when it's part of Rust core language. You know that Rust code has been successfully analysed. Most C code won't give you this. But if it's your code base, you can reach this point in C too.

C also has a fully proven and certified compiler. That might be a requirement if you work in some niche safety critical applications. Rust has no equivalent there.

The discussion is more interesting when you look at other languages. Ada/Spark is for me ahead of Rust both in term of features and user experience regarding the core language.

Rust currently still have what I consider significant flaws: a very slow compiler, no standard, support for a limited number of architectures (it's growing), it's less stable that I consider it should be given its age, and most Rust code tends to use more small libraries than I would personaly like.

Rust is very trendy however and I don't mean that in a bad way. That gives it a lot of leverage. I doubt we will ever see Ada in the kernel but here we are with Rust.

stingraycharles

2 months ago

It’s available on more obscure platforms than Rust, and more people are familiar with it.

I wouldn’t say it’s inevitable that everything will be rewritten in Rust, at the very least this will this decades. C has been with us for more than half a century and is the foundation of pretty much everything, it will take a long time to migrate all that.

More likely is that they will live next to each other for a very, very long time.

QuiEgo

2 months ago

Rust still compiles into bigger binary sizes than C, by a small amount. Although it’s such a complex thing depending on your code that it really depends case-by-case, and you can get pretty close. On embedded systems with small amounts of ram (think on the order of 64kbytes), a few extra kb still hurts a lot.

accelbred

2 months ago

Lack of stable build-std and panic_immediate_abort features result in a order of magnitude size difference for some rust code I have. Using no_std brings it to ~60kb from ~350kb, but still more than the ~40kb for the C version

torginus

2 months ago

Afaik despite Rust not having exceptions, panic still unwinds the stack and executes 'drop'-s the same way C++ does, which means the code retains much of the machinery necessary to support exceptions.

QuiEgo

2 months ago

Apple handled this problem by adding memory safety to C (Firebloom). It seems unlikely they would throw away that investment and move to Rust. I’m sure lots of other companies don’t want to throw away their existing code, and when they write new code there will always be a desire to draw on prior art.

goku12

2 months ago

That's a rather pessimistic take compared to what's actually happening. What you say should apply to the big players like Amazon, Google, Microsoft, etc the most, because they arguably have massive C codebases. Yet, they're also some of the most enthusiastic adopters and promoters of Rust. A lot of other adopters also have legacy C codebases.

I'm not trying to hype up Rust or disparage C. I learned C first and then Rust, even before Rust 1.0 was released. And I have an idea why Rust finds acceptance, which is also what some of these companies have officially mentioned.

C is a nice little language that's easy to learn and understand. But the price you pay for it is in large applications where you have to handle resources like heap allocations. C doesn't offer any help there when you make such mistakes, though some linters might catch them. The reason for this, I think, is that C was developed in an era when they didn't have so much computing power to do such complicated analysis in the compiler.

People have been writing C for ages, but let me tell you - writing correct C is a whole different skill that's hard and takes ages to learn. If you think I'm saying this because I'm a bad programmer, then you would be wrong. I'm not a programmer at all (by qualification), but rather a hardware engineer who is more comfortable with assembly, registers, Bus, DRAM, DMA, etc. I still used to get widespread memory errors, because all it takes is a lapse in attention while coding. That strain is what Rust alleviates.

QuiEgo

2 months ago

Not trying to make a value judgement on Rust either, just brainstorming why Rust changeover might go slow per the question.

FWIW I work in firmware with the heap turned off. I’ve worked on projects in both C and Rust, and agree Rust still adds useful checks (at the cost of compile times and binary sizes). It seems worth the trade off for most projects.

torginus

2 months ago

I'm curious why your perspective on Rust as a HW engineer. Hardware does a ton of things - DMA, interrupts, etc. that are not really compatible with Rust's memory model - after all Rust's immutable borrows should guarantee the values you are reading are not aliased by writers and should be staying constant as long as the borrow exists.

This is obviously not true when the CPU can either yank away the execution to a different part of the program, or some foreign entity can overwrite your memory.

Additionally, in low-level embedded systems, the existence of malloc is not a given, yet Rust seems to assume you can dynamically allocate memory with a stateless allocator.

Surac

2 months ago

So you try to say c is for good programmers only and rust let also the idiots Programm? I think that’s the wrong way to argue for rust. Rust catches one kind of common problem but but does not magically make logic errors away.

AceJohnny2

2 months ago

> It seems unlikely [Apple] would throw away that investment and move to Rust.

Apple has invested in Swift, another high level language with safety guarantees, which happens to have been created under Chris Lattner, otherwise known for creating LLVM. Swift's huge advantage over Rust, for application and system programming is that it supports an ABI [1] which Rust, famously, does not (other than falling back to a C ABI, which degrades its promises).

[1] for more on that topic, I recommend this excellent article: https://faultlore.com/blah/swift-abi/ Side note, the author of that article wrote Rust's std::collections API.

gjajric

2 months ago

Swift does not seem suitable for OS development, at least not as much as C or C++.[0] Swift handles by default a lot of memory by using reference counting, as I understand it, which is not always suitable for OS development.

[0]: Rust, while no longer officially experimental in the Linux kernel, does not yet have major OSs written purely in it.

pjmlp

2 months ago

Also, Swift Embedded came out of the effort to eventually use Swift instead for such use cases at Apple.

stabbles

2 months ago

A C compiler is easier to bootstrap than a Rust compiler.

0xbadcafebee

2 months ago

It's a bit like asking if there is any significant advantage to ICE motors over electric motors. They both have advantages and disadvantages. Every person who uses one or the other, will tell you about their own use case, and why nobody could possibly need to use the alternative.

There's already applications out there for the "old thing" that need to be maintained, and they're way too old for anyone to bother with re-creating it with the "new thing". And the "old thing" has some advantages the "new thing" doesn't have. So some very specific applications will keep using the "old thing". Other applications will use the "new thing" as it is convenient.

To answer your second question, nothing is inevitable, except death, taxes, and the obsolescence of machines. Rust is the new kid on the block now, but in 20 years, everybody will be rewriting all the Rust software in something else (if we even have source code in the future; anyone you know read machine code or punch cards?). C'est la vie.

NetMageSCW

2 months ago

Machine code: Yes. Punched cards: easy - every punch has the character it represents at the top of the card.

user

2 months ago

[deleted]

scottyah

2 months ago

I think it'll be less like telegram lines- which were replaced fully for a major upgrade in functionality, and more like rail lines- which were standardized and ubiquitous, still hold some benefit but mainly only exist in areas people don't venture nearly as much.

greesil

2 months ago

Shitloads of already existing libraries. For example I'm not going to start using it for Arduino-y things until all the peripherals I want have drivers written in Rust.

littlestymaar

2 months ago

Why? You can interact with C libraries from Rust just fine.

LtWorf

2 months ago

But you now have more complexity and no extra safety.

otikik

2 months ago

Ubiquity is still a big one. There's many, many places where C exists that Rust has not reached yet.

s_ting765

2 months ago

You mean safer languages like Fil-C.

qsera

2 months ago

>does C hold any significant advantage over Rust

Yes, it's lots of fun. rust is Boring.

If I want to implement something and have fun doing it, I ll always do it in C.

antioxide

2 months ago

you can look at rust sources of real system programs like framekernel or such things. uefi-rs etc.

there u can likely explore well the boundaries where rust does and does not work.

people have all kind of opinions. mine is this:

if you need unsafe peppered around, the only thing rust offers is being very unergonomic. its hard to write and hard to debug for no reason. Writing memory-safe C code is easy. The problems rust solves arent bad, just solved in a way thats way more complicated than writing same (safe) C code.

a language is not unsafe. you can write perfectly shit code in rust. and you can write perfectly safe code in C.

people need to stop calling a language safe and then reimplementing other peoples hard work in a bad way creating whole new vulnerabilities.

herni

2 months ago

I disagree. Rust shines when you need perform "unsafe" operations. It forces programmers to be explicit and isolate their use of unsafe memory operations. This makes it significantly more feasible to keep track of invariants.

It is completely besides the point that you can also write "shit code" in Rust. Just because you are fed up with the "reimplement the world in Rust" culture does not mean that the tool itself is bad.

vbezhenar

2 months ago

For my hobby code, I'm not going to start writing Rust anytime soon. My code is safe enough and I like C as it is. I don't write software for martian rovers, and for ordinary tasks, C is more ergonomic than Rust, especially for embedded tasks.

For my work code, it all comes down to SDKs and stuff. For example I'm going to write firmware for Nordic ARM chip. Nordic SDK uses C, so I'm not going to jump through infinite number of hoops and incomplete rust ports, I'll just use official SDK and C. If it would be the opposite, I would be using Rust, but I don't think that would happen in the next 10 years.

Just like C++ never killed C, despite being perfect replacement for it, I don't believe that Rust would kill C, or C++, because it's even less convenient replacement. It'll dilute the market, for sure.

anticrymactic

2 months ago

> Just like C++ never killed C, despite being perfect replacement for it

I think c++ didn't replace C because it is a bad language. It did not offer any improvements on the core advantages of C.

Rust however does. It's not perfect, but it has a substantially larger chance of "replacing" C, if that ever happens.

NetMageSCW

2 months ago

I don’t agree that C++ is a bad language, though it has been standardized to death into a bad language. But the whole point is for C++ to not be worse than C while offering a lot more, which I think it does well. Of course, my last serious use of C++ was a little after release E…

obviouslynotme

2 months ago

A lot of C's popularity is with how standard and simple it is. I doubt Rust will be the safe language of the future, simply because of its complexity. The true future of "safe" software is already here, JavaScript.

There will be small niches leftover:

* Embedded - This will always be C. No memory allocation means no Rust benefits. Rust is also too complex for smaller systems to write compilers.

* OS / Kernel - Nearly all of the relevant code is unsafe. There aren't many real benefits. It will happen anyways due to grant funding requirements. This will take decades, maybe a century. A better alternative would be a verified kernel with formal methods and a Linux compatibility layer, but that is pie in the sky.

* Game Engines - Rust screwed up its standard library by not putting custom allocation at the center of it. Until we get a Rust version of the EASTL, adoption will be slow at best.

* High Frequency Traders - They would care about the standard library except they are moving on from C++ to VHDL for their time-sensitive stuff. I would bet they move to a garbage-collected language for everything else, either Java or Go.

* Browsers - Despite being born in a browser, Rust is unlikely to make any inroads. Mozilla lost their ability to make effective change and already killed their Rust project once. Google has probably the largest C++ codebase in the world. Migrating to Rust would be so expensive that the board would squash it.

* High-Throughput Services - This is where I see the bulk of Rust adoption. I would be surprised if major rewrites aren't already underway.

aw1621107

2 months ago

> No memory allocation means no Rust benefits.

This isn't really true; otherwise, there would be no reason for no_std to exist. Data race safety is independent of whether you allocate or not, lifetimes can be handy even for fixed-size arenas, you still get bounds checks, you still get other niceties like sum types/an expressive type system, etc.

> OS / Kernel - Nearly all of the relevant code is unsafe.

I think that characterization is rather exaggerated. IIRC the proportion of unsafe code in Redox OS is somewhere around 10%, and Steve Klabnik said that Oxide's Hubris has a similarly small proportion of unsafe code (~3% as of a year or two ago) [0]

> Browsers - Despite being born in a browser, Rust is unlikely to make any inroads.

Technically speaking, Rust already has. There has been Rust in Firefox for quite a while now, and Chromium has started allowing Rust for third-party components.

[0]: https://news.ycombinator.com/item?id=42312699

[1]: https://old.reddit.com/r/rust/comments/bhtuah/production_dep...

jitl

2 months ago

The Temporal API in Chrome is implemented in Rust. We’re definitely seeing more Rust in browsers including beyond Firefox.

johncolanduoni

2 months ago

> 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 you’re imagining the board of a multi-trillion dollar market cap company is making direct decisions about what languages get used, you may want to check what else in this list you are imagining.

pjmlp

2 months ago

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 the shape of the dependency tree. Rust can not depend on C++ so it cannot know about C++ types and functions, except through dependency injection. In this way, Rust can not land in arbitrary C++ code, only in functions passed through the API from C++.

> We will only support third-party libraries for now. Third-party libraries are written as standalone components, they don’t hold implicit knowledge about the implementation of Chromium. This means they have APIs that are simpler and focused on their single task. Or, put another way, they typically have a narrow interface, without complex pointer graphs and shared ownership. We will be reviewing libraries that we bring in for C++ use to ensure they fit this expectation.

-- https://security.googleblog.com/2023/01/supporting-use-of-ru...

Also even though Rust would be a safer alternative to using C and C++ on the Android NDK, that isn't part of the roadmap, nor the Android team provides any support to those that go down that route. They only see Rust for Android internals, not app developers

If anything, they seem more likely to eventually support Kotlin Native for such cases than Rust.

saghm

2 months ago

> No memory allocation means no Rust benefits

There are memory safety issues that literally only apply to memory on the stack, like returning dangling pointers to local variables. Not touching the heap doesn't magically avoid all of the potential issues in C.

scq

2 months ago

Rust is already making substantial inroads in browsers, especially for things like codecs. Chrome also recently replaced FreeType with Skrifa (Rust), and the JS Temporal API in V8 is implemented in Rust.

juliangmp

2 months ago

> Embedded - This will always be C. No memory allocation means no Rust benefits. Rust is also too complex for smaller systems to write compilers.

Embedded Dev here and I can report that Rust has been more and more of a topic for me. I'm actually using it over C or C++ in a bare metal application. And I don't get where the no allocation -> no benefit thing comes from, Rust gives you much more to work with on bare metal than C or C++ do.

gbin

2 months ago

In robotics too.

Aurornis

2 months ago

> No memory allocation means no Rust benefits.

Memory safety applies to all memory. Not just heap allocated memory.

This is a strange claim because it's so obviously false. Was this comment supposed to be satire and I just missed it?

Anyway, Rust has benefits beyond memory safety.

> Rust is also too complex for smaller systems to write compilers.

Rust uses LLVM as the compiler backend.

There are already a lot of embedded targets for Rust and a growing number of libraries. Some vendors have started adopting it with first-class support. Again, it's weird to make this claim.

> Nearly all of the relevant code is unsafe. There aren't many real benefits.

Unsafe sections do not make the entire usage of Rust unsafe. That's a common misconception from people who don't know much about Rust, but it's not like the unsafe keyword instantly obliterates any Rust advantages, or even all of its safety guarantees.

It's also strange to see this claim under an article about the kernel developers choosing to move forward with Rust.

> High Frequency Traders - They would care about the standard library except they are moving on from C++ to VHDL for their time-sensitive stuff. I would bet they move to a garbage-collected language for everything else, either Java or Go.

C++ and VHDL aren't interchangeable. They serve different purposes for different layers of the system. They aren't moving everything to FPGAs.

Betting on a garbage collected language is strange. Tail latencies matter a lot.

This entire comment is so weird and misinformed that I had to re-read it to make sure it wasn't satire or something.

goku12

2 months ago

> Memory safety applies to all memory. Not just heap allocated memory.

> Anyway, Rust has benefits beyond memory safety.

I want to elaborate on this a little bit. Rust uses some basic patterns to ensure memory safety. They are 1. RAII, 2. the move semantics, and 3. the borrow validation semantics.

This combination however, is useful for compile-time-verified management of any 'resource', not just heap memory. Think of 'resources' as something unique and useful, that you acquire when you need it and release/free it when you're done.

For regular applications, it can be heap memory allocations, file handles, sockets, resource locks, remote session objects, TCP connections, etc. For OS and embedded systems, that could be a device buffer, bus ownership, config objects, etc.

> > Nearly all of the relevant code is unsafe. There aren't many real benefits.

Yes. This part is a bit weird. The fundamental idea of 'unsafe' is to limit the scope of unsafe operations to as few lines as possible (The same concept can be expressed in different ways. So don't get offended if it doesn't match what you've heard earlier exactly.) Parts that go inside these unsafe blocks are surprisingly small in practice. An entire kernel isn't all unsafe by any measure.

tayo42

2 months ago

Rust isn't that complex unless your pulling in magical macro libraries or dealing with things like pin and that stuff,which you really don't need to.

It's like saying python is complex becasue you have metaclasses, but you'll never need to reach for them.

throwaway2037

2 months ago

    > Rust is also too complex for smaller systems to write compilers.
I am not a compiler engineer, but I want to tease apart this statement. As I understand, the main Rust compiler uses LLVM framework which uses an intermediate language that is somewhat like platform independent assembly code. As long as you can write a lexer/parser to generate the intermediate language, there will be a separate backend to generate machine code from the intermediate language. In my (non-compiler-engineer) mind, separates the concern of front-end language (Rust) from target platform (embedded). Do you agree? Or do I misunderstand?

qalmakka

2 months ago

> Embedded - This will always be C. No memory allocation means no Rust benefits. Rust is also too complex for smaller systems to write compilers.

Modern embedded isn't your grandpa's embedded anymore. Modern embedded chips have multiple KiB of ram, some even above 1MiB and have been like that for almost a decade (look at ESP32 for instance). I once worked on embedded projects based on ESP32 that used full C++, with allocators, exceptions, ... using SPI RAM and worked great. There's a fantastic port of ESP-IDF on Rust that Espressif themselves is maintaining nowadays, too.

j16sdiz

2 months ago

> The true future of "safe" software is already here, JavaScript.

only in interpreter mode.

sunshowers

2 months ago

JavaScript does not have a separation between & and &mut.

arilotter

2 months ago

This title is moderately clickbait-y and comes with a subtle implication that Rust might be getting removed from the kernel. IMO it should be changed to "Rust in the kernel is no longer experimental"

sho_hn

2 months ago

I absolutely understand the sentiment, but LWN is a second-to-none publication that on this rare occasion couldn't resist the joke, and also largely plays to an audience who will immediately understand that it's tongue-in-cheek.

Speaking as a subscriber of about two decades who perhaps wouldn't have a career without the enormous amount of high-quality education provided by LWN content, or at least a far lesser one: Let's forgive.

DrammBA

2 months ago

> on this rare occasion couldn't resist the joke

It was unintentional as per author

> Ouch. That is what I get for pushing something out during a meeting, I guess. That was not my point; the experiment is done, and it was a success. I meant no more than that.

DANmode

2 months ago

The “Ouch.” was in reference to being compared to Phoronix.

Has anyone found them to be inaccurate, or fluffy to the point it degraded the content?

I haven’t - but then again, probably predominantly reading the best posts being shared on aggregators.

b33j0r

2 months ago

Fair. But there’s even an additional difference between snarky clickbait and “giving the exact opposite impression of the truth in a headline” ;)

nailer

2 months ago

Hacker news generally removes Clickbait titles regardless of the provenance

raggi

2 months ago

If it was being removed the title would be "An update on rust in the kernel"

joshdavham

2 months ago

I think on HN, people generally want the submission's title to match the page's title.

(I do agree it's clickbait-y though)

not2b

2 months ago

I think on HN, people waste too much time arguing about the phrasing of the headline, whether it is clickbait, etc. and not enough discussing the actual substance of the article.

Archelaos

2 months ago

I prefer improved titles. However, not in this case. It is rather irony, because LWN does not need click-bait.

goku12

2 months ago

This one is apparently a genuine mistake from the author. But I think we should leave it as it is. The confusion and the argument about it is interesting in itself.

onedognight

2 months ago

It’s a bit clickbait-y, but the article is short, to the point, and frankly satisfying. If there is such a thing as good clickbait, then this might be it. Impressive work!

ModernMech

2 months ago

Might as well just post it:

  The topic of the Rust experiment was just discussed at the annual Maintainers Summit. The consensus among the assembled developers is that Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay. So the "experimental" tag will be coming off. Congratulations are in order for all of the Rust-for-Linux team.

testdelacc1

2 months ago

This should just be the pinned comment.

Redster

2 months ago

Perhaps, except it can have the reverse effect. I was surprised, disappointed, and then almost moved on without clicking the link or the discussion. I'm glad I clicked. But good titles don't mislead! (To be fair, this one didn't mislead, but it was confusing at best.)

CrankyBear

2 months ago

He didn't mean to! That said, the headline did make me look.

panzi

2 months ago

I'm having deja Vu. Was there another quite similar headline here a few weeks or so ago?

Aldipower

2 months ago

Seems you do not understand the concept of fun. You can learn that, makes your life easier.

tzury

2 months ago

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

devsda

2 months ago

> same Mike in an org wide email: thank you all for your support. Starting next week I will no longer be a developer here. I thank my manager blah blah... I will be starting my dream role as Architect and I hope to achieve success.

> Mike's colleagues: Aww.. We'll miss you.

> Mike's manager: Is this your one week's notice? Did you take up an architect job elsewhere immediately after I promoted you to architect ?!

keybored

2 months ago

Joke, enterprise edition..

notachatbot123

2 months ago

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

Elfener

2 months ago

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

cevious

2 months ago

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 is more performant and more efficient than the best result using C?

This isn’t about what people want to use because it’s a nice language for writing applications. The kernel is about making things work with minimum overhead.

By analogy, the Linux kernel historically has been a small shop mentored by a fine woodworker. Microsoft historically has been a corporation with a get-it-done attitude. Now we’re saying Linux should be a “let’s see what the group thinks- no they don’t like your old ways, and you don’t have the energy anymore to manage this” shop, which is sad, but that is the story everywhere now. This isn’t some 20th century revolution where hippies eating apples and doing drugs are creating video games and graphical operating systems, it’s just abandoning old ways because they don’t like them and think the new ways are good enough and are easier to manage and invite more people in than the old ways. That’s Microsoft creep.

TazeTSchnitzel

2 months ago

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

bonzini

2 months ago

> Forget the bells-and-whistles and answer this: does the use of Rust generate a result that is more performant and more efficient than the best result using C?

These are the performance results for an NVMe driver written in Rust: https://rust-for-linux.com/nvme-driver

It's absolutely on par with C code.

user

2 months ago

[deleted]

raaron773

2 months ago

I legit thought that rust is being removed.

Good meme!

bryanrasmussen

2 months ago

really? I recently read that "A 100% Rust kernel is now upstream in Linux 7.4"

bryanrasmussen

2 months ago

I see that my ability to communicate things obliquely as is my habit and the hallmark of my personal style is doing as well as ever on HN.

krick

2 months ago

FWIW, I personally liked the joke.

gaudystead

2 months ago

I was wondering if anybody "ate the onion" from the other day...

hantusk

2 months ago

you're joking because of the other frontpage story with Gemini 3 hallucinating hacker news 10 years in the future, but still lets keep the hallucinations to that page.

anotherhue

2 months ago

Safety is good.

userbinator

2 months ago

Unless it means sacrificing freedom.

mlindner

2 months ago

Providing the default of additional safety with the ability to opt out that safety is pro-freedom.

kupopuffs

2 months ago

freedom to shoot yourself in the foot?

user

2 months ago

[deleted]

lomase

2 months ago

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

scuff3d

2 months ago

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 seen languages emerge that could actually replace C/C++ with projects like Rust, Zig and Odin. I'm not saying they will, or they should, but just that we actually have alternatives now.

pjmlp

2 months ago

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.

vbezhenar

2 months ago

One could rewrite curl with Perl 30 years ago. Or with Java, Golang, Python, you name it. Yet it stays written with C even today.

lomase

2 months ago

As everybody knows not a single programming language was released between C++ and Rust.

vardump

2 months ago

That's not true when the topic is operating system kernels.

checker659

2 months ago

OS kernels? Everything from numpy to CUDA to NCCL is using C/C++ (doing all the behind the scene heavy lifting), never mind the classic systems software like web browsers, web servers, networking control plane (the list goes on).

wat10000

2 months ago

Most of the world uses other languages because they’re easier, not because they’re safer.

gpm

2 months ago

They're easier because, amongst other improvements, they are safer.

bogantech

2 months ago

Most software development these days is JS/Typescript slop, popular doesn't equal better

recursive

2 months ago

You can write slop in any language. And good software for that matter.

_jzlw

2 months ago

[flagged]

RustSupremacist

2 months ago

[flagged]

tomhow

2 months ago

Many of your comments seem to be charged meta-commentary about posts and threads. If you want to participate on HN, please do so as it's intended: by discussing the topics in a curious, conversational way. If other users are engaging in ideological battle, they are breaking the guidelines and you are welcome to flag their comments and email us (hn@ycombinator.com) to report them. If a post is bad for HN, you can flag it and email us explaining why. We can and do routinely take action against abuse or manipulation on HN when we know about it. But this kind of "something needs to be done" proclamation, without any engagement with the moderators or actionable suggestions, amounts to nothing more than empty venting, which can only drag this place downwards.

Please make an effort to observe the guidelines if you want to participate here.

https://news.ycombinator.com/newsguidelines.html

RustSupremacist

2 months ago

[flagged]

whytevuhuni

2 months ago

> The damage from the correction that comes later will do so much harm.

Which part here is misinformation? Do you know something we, or the author, does not? I'm quite curious what that might be.

nalnq

2 months ago

[flagged]

sedatk

2 months ago

What yucky politics?

oblio

2 months ago

Probably something silly because we live in the age of polarization and thoughts compressed in 150 character tweets.

notthemessiah

2 months ago

Agreed, the vagueposting is indication of ill-intent of the top-level comment. No hyperlinks or specifics, it might as well be a game of mad-libs where you insert your grievance here.

reppap

2 months ago

Insane people have decided that Rust is on the "woke" side of the culture war. Reading the phoronix comment section is hilarious because any post about rust devolves into a bunch of boomers whining about "blue-haired woke rust programmers" and other nonsense.

CrulesAll

2 months ago

That's not how it works. Once in control, vanguardism defends itself by suppressing all dissent. It does not dissipate. It grows like a virus.

nalnq

2 months ago

Maybe so. But on the other hand as the community grows and becomes politically diverse, you will stop being afraid of being branded part of political movements that you don’t like just by using a certain programming language, which is… good enough?

Surac

2 months ago

[flagged]

johncolanduoni

2 months ago

If drama was going to drive Linux kernel developers away, it would have just been Torvalds working on it alone for 30 years. For better or worse, that community has selected for having very thorough antibodies to conflict.

bigfishrunning

2 months ago

You should learn some, you might change your opinion! At the end of the day, having some pressure to select for kernel developers that are open minded and willing to learn new things might not be a bad thing. And at any rate, C will be a big part of kernel development forever, so those unwilling to learn new tools or techniques can still contribute in a meaningful way if they want to.

oblio

2 months ago

1. Which drama?

2. End users absolutely do not care in which programming language an application (or OS, they can't tell the difference and don't care) is written in. They only care if it does the job they need quickly, safely and easily.

notthemessiah

2 months ago

I'm guessing he means Rust voicing solidarity with Ukraine and sympathy with everyone affected by a conflict? It's hard to tell when people vaguepost. I guess wars of invasion/annexation are too controversial to oppose.

"Before going into the details of the new Rust release, we'd like to state that we stand in solidarity with the people of Ukraine and express our support for all people affected by this conflict."

wewewedxfgdf

2 months ago

Oh dear can you imagine the crushing complexity of a future Rust kernel.

dralley

2 months ago

By most accounts the Rust4Linux project has made the kernel less complex by forcing some technical debt to be addressed and bad APIs to be improved.

mlindner

2 months ago

This made me quite curious, is there a list somewhere of what bad APIs have been removed/improved and/or technical debt that's been addressed? Or if not a list, some notable examples?

dwattttt

2 months ago

I don't know that there's a list, but cases come to mind because they've been controversial.

(Not a Linux hacker, so apologies if I get this wrong)

The filesystem APIs were quite arcane, and in particular whether or not you were allowed to call a C function at a certain point wasn't documented, and relied on experience to know already.

In trying to write idiomatic Rust bindings, the Rust for Linux group asked the filesystems maintainer if they could document these requirements, so that the Rust bindings could enforce as much of them as they could.

The result was... drama.

JuniperMesos

2 months ago

The Linux kernel is already very complex, and I expect that replacing much or all of it with Rust code will be good for making it more tractable to understand. Because you can represent complex states with more sophisticated types than in C, if nothing else.

J_Shelby_J

2 months ago

Complexity of Rust is just codifying existing complexity.

accelbred

2 months ago

I've been working on Rust bindings for a C SDK recently, and the Rust wrapper code was far more complex than the C code it wrapped. I ended up ceding and getting reasonable wrappers by limiting how it can be used, instead of moddeling the C API's full capabilities. There are certainly sound, reasonable models of memory ownership that are difficult or impossible to express with Rust's ownership model.

Sure, a different model that was easy to model would have been picked if we were initially using Rust, but we were not, and the existing model in C is what we need to wrap. Also, a more Rust-friendly model would have incured higher memory costs.

josephg

2 months ago

I totally hear you about C friendly APIs not making sense in rust. GTK struggles with this - I tried to make a native UI in rust a few months ago using gtk and it was horrible.

> Also, a more Rust-friendly model would have incured higher memory costs.

Can you give some details? This hasn’t been my experience.

I find in general rust’s ownership model pushes me toward designs where all my structs are in a strict tree, which is very efficient in memory since everything is packed in memory. In comparison, most C++ APIs I’ve used make a nest of objects with pointers going everywhere. And this style is less memory efficient, and less performant because of page faults.

C has access to a couple tricks safe rust is missing. But on the flip side, C’s lack of generics means lots of programs roll their own hash tables, array lists and various other tools. And they’re often either dynamically typed (and horribly inefficient as a result) or they do macro tricks with type parameters - and that’s ugly as sin. A lack of generics and monomorphization means C programs usually have slightly smaller binaries. But they often don’t run as fast. That’s often a bad trade on modern computers.

accelbred

2 months ago

The code is written in an embedded style, i.e. no dynamic memory allocation or thread creation/deletion after program initialization. It's also prioritizing reducing memory usage over performance since we are targeting memory constrained devices (and our performance target is 10 tps and we have like 100k tps). Thus we'd use trait objects over monomorphization. Dynamic collections are also off the table unless backed by a fixed-size arena on the stack or static mem.

We heavily use arenas. We also have runtime-typed objects used to represent dynamically typed data like that obtained from JSON/Yaml or over IPC. If we were to be more friendly to modeling in Rust, we'd likely require that all memory reachable from an object node be in the same arena, disallowing common patterns like having list/map's arrays in one arena and having keys/strings in another or in static mem (this allows reusing other buffers without forcing copying all the data, so backing arrays can be smaller).

josephg

2 months ago

You said above:

> Also, a more Rust-friendly model would have incured higher memory costs.

I'm not sure how modelling everything in a rust borrow checker friendly way would change anything here? Everything you're talking about doing in C could be done more or less exactly the same in rust.

Arenas are slightly inconvenient in rust because the standard collection types bake in the assumption that they're working with the global system allocator. But there's plenty of high quality arena crates in rust which ship their own replacements for Vec / HashMap / etc.

It also sounds like you'd need to write or adapt your own JSON parser. But it sounds like you might be writing part of your own JSON / Yaml parser in C anyway.

accelbred

2 months ago

Arenas aren't the issue. Its objects with mixed lifetimes and mutability. I cant easily model the lifetimes of objects when there are cases like an instance where buffer memory reachable from the object has a different lifetime than maps/lists. Also these objects could be transively shared or mutable. In order to make a Rust friendly model, I'd have the tree be all shared or all mutable, and have all reachable memory have the same lifetime. This would often mean allocating the full tree into one arena. That is where the overhead comes from. Each arena would need enough memory to store the entire object; currently they can be smaller since they often only need to hold parts of objects, not the entire thing.

dwattttt

2 months ago

This is ultimately a good example of how to use Rust. You express as much of the API as you can safely, and the rest is unsafe. APIs that can't be safely modelled can still be exposed to Rust & marked unsafe, if they're needed

accelbred

2 months ago

That works for functions. For datatypes that are used throughout the API, it does not work so well.

dwattttt

2 months ago

Wouldn't a data type with no safe method of construction satisfy that? You can only get one by calling an unsafe function & satisfying its constraints.

accelbred

2 months ago

That would be possible but also make its usage unergonomic and not the experience customers are expecting when requesting a Rust API.

generalenvelope

2 months ago

Which SDK? I've only written Rust FFI to pretty basic C APIs. I'm curious to get a sense of the limitations on something more complex

g947o

2 months ago

Do you have any quantitative measures to prove there would be an increase in complexity?

user

2 months ago

[deleted]

amelius

2 months ago

That's what you get with slippery slopes.

jenadine

2 months ago

And yet, the Linux kernel's Rust code uses unstable features only available on a nightly compiler.

Not optimal for ease of compilation and building old versions of the Kernel. (You need a specific version of the nightly compiler to build a specific version of the Kernel)

barrucadu

2 months ago

Don't the C parts of Linux heavily depend on GCC extensions too? Seems depending on specific compiler features isn't really a blocker.

tambre

2 months ago

The difference probably is that GCC extensions have been stable for decades. Meanwhile Rust experimental features have breaking changes between versions. So a Rust version 6 months from now likely won't be able to compile the kernel we have today, but a GCC version in a decade will still work.

hmry

2 months ago

luckily downloading a specific nightly version is only a single rustup command

hulitu

2 months ago

Besides supply chain attacks, what could go wrong ? /s

abhinavk

2 months ago

Kernel doesn't use Cargo.

accelbred

2 months ago

rustup is also downloading binary toolchains

Levitating

2 months ago

> Not optimal for ease of compilation and building old versions of the Kernel. (You need a specific version of the nightly compiler to build a specific version of the Kernel)

It's trivial to install a specific version of the toolchain though.

qwm

2 months ago

You don't generally need specific versions of GCC or Clang to build it I'm pretty sure.

mustache_kimono

2 months ago

> You don't generally need specific versions of GCC or Clang to build it I'm pretty sure.

You need a C11 compiler these days with loads of non-standard extensions. Note, for a very long time, one couldn't compile the Linux kernel with clang because it lacked this GCC specific behavior.

I'm not really sure you can turn around and say -- Oh, but now we feel differently about the C standard -- given how much is still non-standard. For instance, I don't believe Intel's C compiler will compile the kernel, etc.

accelbred

2 months ago

It really isn't if bootstrapping from source.

johncolanduoni

2 months ago

What if I told you… there was a simple, constant environment variable you could set to make the stable compiler forget it isn’t a nightly?

estebank

2 months ago

When it comes to nightly features use, it is good to note that a stable compiler, a nightly corresponding to the date beta for that stable was branched out and an arbitrary nightly are different. A branched-off nightly might have had beta back ports for fixing stable features that the nightly will not have, and a nightly feature that is subtly broken on stable but isn't used in std will not have received a backport. So using nightly feature on stable might mean every now and then skipping a stable version, and using a nightly compiler means having to do thorough testing after updating on arbitrary days. Any given nightly has high chances of being fine, but every update brings the possibility of bugs.

nialv7

2 months ago

the point is unstable features aren't guaranteed to not break after a compiler update. hence the specific version thing.

sebzim4500

2 months ago

It's not ideal, but at least most of these are only used in the `kernel` crate, i.e. if there's a breaking change to these features it should be fixable without widespread changes.

hexo

2 months ago

And we're cooked.

fithisux

2 months ago

Rust in the kernel is a self-fulfilling prophecy.

andersmurphy

2 months ago

I guess it's time to finally try FreeBSD.

josephg

2 months ago

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.

andersmurphy

2 months ago

It's not about rust or no rust, rust is fine. It's about the constant drama.

timeon

2 months ago

> It's about the constant drama.

So why are you posting things like drama queen:

> I guess it's time to finally try FreeBSD.

(btw. FreeBSD is fine)

ggm

2 months ago

Lua in the kernel!

astrange

2 months ago

BSD development mostly works through the classic approach of pretending that if you write C code and then stare at it really really hard it'll be correct.

I'm not actually sure if they've gotten as far as having unit tests.

(OpenBSD adds the additional step of adding a zillion security mitigations that were revealed to them in a dream and don't actually do anything.)

anthk

2 months ago

They don't do anything yet they segfault some C turd from 'The computational beauty of Nature's. You have no clue about any BSD and it looks. Every BSD has nothing to do which each other.

astrange

2 months ago

Not sure if this is speech to text.

p0w3n3d

2 months ago

They had me in the first half of the article, not gonna lie. I thought they resigned because Rust was so complicated and unsuitable, but it's the opposite

qwm

2 months ago

It got my hopes up that they had backed off so they could solve their problems before returning to subject the kernel to their language.

sshadmand

2 months ago

I haven't had time to experiment with it yet. How is agent directed development doing with Rust 0-to-1 an 1-inf. product gen?

stackedinserter

2 months ago

Why do Rust developers create so much drama everywhere? "Rewrite everything to Rust", "Rust is better than X" in all threads related to other languages, "how do you know it's safe if you don't use Holy Glorious Rust".

I'm genuinely not trolling, and Rust is okay, but only Rust acolytes exhibit this behaviour.

Simplita

2 months ago

I’m curious how they’ll manage long term safety without the guarantees Rust brought. That tradeoff won’t age well.

javawizard

2 months ago

You may want to read the article.

(Spoiler alert: Rust graduated to a full, first-class part of the kernel; it isn't being removed.)

silisili

2 months ago

It's late, but I'm having a hell of a time parsing this. Could you explain what you meant?

javawizard

2 months ago

I think they read the title but not the article and assumed Rust was being removed, and (rightfully, if that were true) opined that that was a shortsighted decision.

(Of course, that's not what's happening at all.)

silisili

2 months ago

Ah! I hadn't considered that, thanks. That makes way more sense - having read the article I couldn't figure out what was being said here otherwise.

hgs3

2 months ago

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.

inapis

2 months ago

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.

hgs3

2 months ago

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.

SSLy

2 months ago

Linus holds many opinions chiefly based on 90's experience, many not relevant any more. So it goes.

FpUser

2 months ago

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

tgma

2 months ago

Why do you think performance isn't relevant in 2025?

sedatk

2 months ago

Microkernel architecture doesn't magically eliminate bugs, it just replaces a subset of kernel panics with app crashes. Bugs will be there, they will keep impacting users, they will need to be fixed.

Rust would still help to eliminate those bugs.

johncolanduoni

2 months ago

I agree it doesn’t magically eliminate bugs, and I don’t think rearchitecting the existing Linux kernel would be a fruitful direction regardless. That said, OS services split out into apps with more limited access can still provide a meaningful security barrier in the event of a crash. As it stands, a full kernel-space RCE is game over for a Linux system.

TZubiri

2 months ago

You should develop a small experimental kernel with that architecture and publish it on a mailing list.

tgma

2 months ago

Just use MINIX, or GNU Hurd.

fuzztester

2 months ago

Even better, be like the Amish, and build your own as much as you can.

tgma

2 months ago

Not sure I get the joke. MINIX is not building from scratch. It's a serious choice if one needs a microkernel. Hurd is more experimental but still not Amish.

fuzztester

2 months ago

Sorry I only saw your reply now. It was not meant as a joke. The point was more about being self-reliant. But it was a light-gearted comment.

Arodex

2 months ago

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

semiinfinitely

2 months ago

This is great because it means someday (possibly soon) Linux development will slowly grind to a halt and become unmaintainable, so we can start from scratch and write a new kernel.

bigfishrunning

2 months ago

You can start from scratch and write a new kernel now! Nothing's stopping you.

timeon

2 months ago

Ideally in Rust.

preisschild

2 months ago

Or you can take this as a sign that the linux kernel adapts modern programming languages so that more programmers can contribute :)

GaryBluto

2 months ago

> the linux kernel adapts modern programming languages so that more programmers can contribute :)

I'm eagerly awaiting the day the Linux kernel is rewritten in Typescript so that more programmers can contribute :)

ls-a

2 months ago

I never used linux because it was built using C++. Never have I cared what language the product was built it. The Rust community however wants you to use a product just because it's implemented in Rust, or atleast as one of the selling points. For that reason I decided to avoid any product that advertises using Rust as a selling point, as much as I can. Was planning to switch from Mac to a Linux machine, not anymore, I'm happily upgrading my mac.

jjice

2 months ago

It's an optional tool that can be used to implement drivers now, not forced. If you don't like the idea of another language being supported for implementing a subset of kernel modules, I don't think you wouldn't enjoyed having a Linux machine anyways.

ls-a

2 months ago

That's not the case. It's using Rust as a selling point. All the noise around using Rust is marketing. The fact that you think linux machines are enjoyed by only a specific group of people makes me happier with my choice

jjice

2 months ago

> That's not the case. It's using Rust as a selling point

"Rust as a selling point" was a big thing in 2018-2022ish. You see it a lot less of the "written in Rust" in HN headlines these days. Some people were very excited about Rust early on. What feels more common today are people who unnecessarily hate Rust because they saw too much of this hype and they (justifiably) got annoyed by it.

If there is a new, optional language to be added to Linux Kernel development, Rust makes sense. It's a low level, performant, and safe language. Introducing it for driver development has almost no impact on 99% of users, except maybe it'll safe them a memory related bug fix patch having to be installed at some point. Is Rust the "selling point" here, or is the potential to avoid an entire class of bugs the selling point?

> The fact that you think linux machines are enjoyed by only a specific group of people makes me happier with my choice

If by "specific group of people" you mean "people who will refuse to use an OS based on the implementation language(s)", then I guess so.

I don't mean to be rude (although it reads like it, apologies), but I just think that you're coming at this from a perspective of malice instead of what the goal was, which was to reduce bugs in kernel drivers, and not to pimp Rust as a programming language by getting it into a large software project.

ls-a

2 months ago

No worries I didn't take offenses. I just disagree. The title should've been we reduced bugs in the kernel and here is some proof of that. The 2018-2022-ish hype (I call it bullying campaign) is still strong. Google recently did a blog post about Rust speeding up their development, in the age of LLMs, seriously! I can't stop lol'ing at that

umanwizard

2 months ago

> It's using Rust as a selling point.

That's just not true. Neither Linus Torvalds, nor the Linux Foundation, nor any major distro, nor anyone else who could conceivably be considered responsible for "marketing" Linux is saying you should use it because a small part of it is written in Rust.

I just went to ubuntu.com and the word "rust" does not appear anywhere on the front page. So what are you talking about?

ls-a

2 months ago

> Stay tuned for details in our Maintainers Summit coverage.

I can argue otherwise. Developer advocacy is a form of marketing (specially for a product traditionally targeted towards tech savvy people)

michaelmcmillan

2 months ago

Linux is written in C, my friend.

ls-a

2 months ago

C, C++, I don't think you got the gist of what I said