Linux royalty backs adoption of Rust for kernel code
-
I don't know about you, but I prefer provably correct code over "just trust me bro."
There's an analogy I like here. A manager at a trucking company was hiring a new driver, and he asked each of them how close they could get to the edge on a mountain pass. The first said, "I can get within a wheel's width." The second said, "I can drive on the edge, with part of the tire hanging off." And the third said, "I stay away from the edge." The third applicant got the job, because why take the risk?
That's how I feel about C/C++. Why use them if Rust can do the job? You get a lot more safety features without sacrificing performance, what's not to like?
-
This sort of exists https://reactos.org/
Key word on sort of, it's quite rough in many areas
-
In general, for me, Rust > C > C++.
I've heard people say that C is like a loaded and cocked revolved, and if you're not careful, you could blow your foot off, whereas C++ is like a loaded and cocked sawed-off shotgun, and if you're not careful, you could blow your leg off.
-
And that's why I don't work in software development!
-
But some beautiful day in the future, bad code will write badder code.
-
The second they make it a mixed code base, that's the same second quality will deteriorate.
I envy your confidence!
-
That’s kind the entirety of my point: if Rust is a tool that can make expressing algorithms safer and less prone to error - and it can, in a logically provable sense - then what the fuck ground do you have to push back on?
-
Theres heaps of stuff that is under-developed or mssing, but they prefer to rewrite working code in Rust, because ideology.
We are witnessing the death of Linux here, no less, replacing a working kernal with an still undefined language that everyone will have forgotten in 5 years.
-
I feel like better tooling is a safer bet. I know people hate on AI here but tooling that can detect flaws in C memory management would be basically as good as Rust itself.
-
There was a "Lindows" back in the day...
-
Maybe I'm wrong, but as I read the article, Linus isn't convinced this is a good idea either.
I'm not saying things can never change, but opening for a mixed code base is a recipe for disaster. -
C++ is a semi automatic shotgun with 200 barrels pointing in all directions.
-
In my mind, introducing Rust would only make sense if:
- There was a serious lack of current kernel developers (which I don't think there is)
- New hardware and tech was evolving at a rate that the Linux Kernel could not keep up (again, I don't think this is am issue)
- The end goal is to migrate the entire Kernel to Rust.
Regarding point 3, having both C and Rust really only makes sense as a transition phase (measured in years) - as it would require kernel developers to be savvy in both C and Rust, or would force developers to stay within whatever domains were implemented in C or Rust.
-
Despite my drive-by shitposts in the rest of this thread I want to make a serious point here.
There's a large part of software engineering that thinks languages are chosen based on the problem, as a tool for a job.
They aren't. They're chosen based on the team, on how well the team knows and can use the tool.
On how many people can be hired with the knowledge of the tool to work immediately.Sometimes, even if the team knows C well, there can be a problem so different it's worth using another tool. say python for some testing scripts on a C project.
But rust and C are too similar for this to apply.
If you want rust to be used for the kernel you have to push for it to be more well known and used, so more Devs come into teams already knowing it well.
Anyone agreeing to work on a team using rust is making a career decision that will be stay on their CV forever and you need them to feel good about this, that it will give them more opportunity in future.It'll take 20+ years because that's how long legacy code is often maintained for and we already have 20+ years of future legacy code for C teams to deal with. We're all making more future legacy C code than future legacy rust code too.
I'm trapped in C++ so I'm doomed but good luck C and Rust coders.
-
What's in your mind does not coincide with the professional experience of Greg KH. You shoyld read what he had to say on the subject.
-
You're wrong, but it's possible the article gave you that impression. Read the mailing-list thread.
It's particularly worth reading Ted T'so's contribution, which (considering his rude behaviour at the recent con led to a previous round of this nonsense) seems much more positive.
-
Did somebody say "provably correct"?
Haskell has entered the chat
-
it would require kernel developers to be savvy in both C and Rust
From my experience knowing how both C and rust works makes you a better developer in both languages.
-
-
Because people already know C/C++.