News for hackers. Stuff that matters.
Re:Ask HN: How is Rust used in the Linux kernel today? by VancouverMan on Tuesday September 12, 2023 @09:39AM (#37481055)
It might be helpful to consider the Firefox situation, too. That is also a relatively large, established, and actively-developed software system that began to include some Rust code later on in its existence.

If I'm not mistaken, the first stable Firefox releases including notable usage of Rust code came out in late 2017. So that's about 6 years of Rust in Firefox.

From a Firefox user's perspective, I can't say that I'm impressed by it.

Building Firefox from source is more involved than it was before. As you mentioned, additional tooling for Rust is required in such a situation.

I haven't really noticed any real Firefox feature, functionality, or performance improvements that I could directly attribute to the use of Rust.

It also doesn't seem like using Rust has allowed the Firefox developers to be significantly more efficient or productive than they were before.

Maybe an argument could be made that some security issues, for example, have been avoided thanks to Rust, but that's not really provable in any meaningful way.

After seeing the Firefox situation, my expectations for the use of Rust in the Linux kernel are pretty low.

Re:Ask HN: How is Rust used in the Linux kernel today? by cmrx64 on Tuesday September 12, 2023 @09:48AM (#37481211)
> Maybe an argument could be made that some security issues, for example, have been avoided thanks to Rust, but that's not really provable in any meaningful way.

Google has some pretty good data on this: https://security.googleblog.com/2022/12/memory-safe-language...

As for Firefox, the CSS engine was rewritten to be parallel, among other improvements (new wasm compiler, new parallel compositor) that would have been challenging without Rust: https://wiki.mozilla.org/Oxidation

Re:Ask HN: How is Rust used in the Linux kernel today? by lovasoa on Tuesday September 12, 2023 @10:14AM (#37481628)
I remember seeing a blog post by Mozilla explaining how the new css engine, which is measurably faster, would never have been implemented in C++ because the engineers were not confident they could handle the tricky concurrency issues in that language.
Re:Ask HN: How is Rust used in the Linux kernel today? by NiLSPACE on Wednesday September 13, 2023 @02:52AM (#37493086)
Re:Ask HN: How is Rust used in the Linux kernel today? by panick21_ on Tuesday September 12, 2023 @05:45PM (#37488924)
Its a bit of strange argument that you as a users can't 'feel' it. The people picking Rust for more and more project inside of Mozilla probably know what they are more productive in (and will end up with less bugs). Just guessing at it from the outside seems like a really bad and unfair way to judge.

> but that's not really provable in any meaningful way.

Can you prove that Rust didn't make developers more productive?

Also, that there are less memory bugs in Rust then in C++ is just common sense and pretty generally accepted. It doesn't need to be proven again for every project.

> After seeing the Firefox situation

The situation where more and more code is written in Rust because most people prefer it?

Re:Ask HN: How is Rust used in the Linux kernel today? by pornel on Tuesday September 12, 2023 @11:07PM (#37491731)
Project quantum saved Firefox.

Multi-core CSS engine and GPU-accelerated rendering in Firefox are in Rust. Without them Firefox was really behind in performance (if you're unimpressed now, imagine it being way worse).