Linux 6.14 With Rust: "We Are Almost At The 'Write A Real Driver In Rust' Stage Now"
Linux 6.14 With Rust: "We Are Almost At The 'Write A Real Driver In Rust' Stage Now"
Linux 6.14 With Rust: "We Are Almost At The 'Write A Real Driver In Rust' Stage Now"
I find this headline incredibly misleading. Proper non-trivial Rust drivers already exist in the kernel. The entire Apple graphical stack for the ARM M-series SoCs is written in Rust, and it’s beyond excellent
I’m not sure it’s mainline yet? It may just be part of the Asahi project. From my understanding, they are being developed out of tree and will be merged/submitted later.
Yeah a lot of it is in the unstable builds for practically any mainstream distros.
What is wrong with the commenters on Phoronix? There seem to be a bunch of old dudes who can't accept that C is unsafe and no amount of "skill" will prevent it from being unsafe. They look at 3 decades of unsafe C with thousands of CVEs and still think it's a skill issue.
There are exactly 3 types of phoronix commenters:
I love C and C++ and I talk to someone else who does (comp sci grad) but he's hugely biased against rust and says shit like "rust is cringe it has training wheels, just be good at C"
it's like a weird tech anti-intellectualism
If you think the comments about Rust are bad, you should check out any article about X11/Wayland or systemd.
Yeah, I don't understand the wayland and systemd hate. Personally, the alternatives are worse in many areas. managing services before systemd was terrible and I'm very happy it's here. Making services depend on magic comments is a terrible system IMO. Can't remember if that's upstart or rinit or whatever.
If you open the comments on Phoronix you have already lost.
Learning that the hard way 😂
The C/C++ fandom is...something else. For many, C is perfect for every use case and everything else higher level from C# to JavaScript is nothing but inefficient waste for programmers who aren't good enough for something like C lol
Technically, it is a skill issue though, but requires borderline perfection to achieve safe code. It's still a bad argument and detracts from progress in an area where it's sorely needed. Correct me if I'm wrong, but my understanding is that everything unsafe is because the logic used left something exposed where rust has rules in the language the prevents those had coding practices. C is inherently unsafe, it just doesn't have built in safe guards to keep the dev from using it wrong.
Technically, it is a skill issue though, but requires borderline perfection to achieve safe code
If near perfection is the minimum to achieve a goal, then it can't be a skill issue, IMO. But I agree with the rest. It's a terrible argument that keeps getting repeated, not only for C but many other places in the tech world.
Well performance is important and Rust is fast on paper afaik but idk how it works in real use cases. I don't remember seeing performance benefits on Rust compared to other languages that are not C.
There's a paper about this and with C as the baseline, Rust was 4% slower for the specific tests they ran.
In these tests, Rust is actually faster than C sometimes.
So it really does depend on the workload. However, the safety that rust provides cannot be understated. It's easy to cut corners like in C, but it's difficult to do it right. Rust provides the closest result of right and fast.
... depending on what you want to do.
Anything useful is still "unsafe."
Anything useful is still "unsafe."
So you take care with the bits that have to deal with C, just like you have to with C code itself, and then all the rest of your code is still safe by default. Still a net improvement, yes?
Yes, then they shouldn't say it is "safe" because it isn't. They should say "more safe", or be more specific.