Originally posted by Almindor
View Post
Announcement
Collapse
No announcement yet.
Rust Support In The Linux Kernel Undergoing Another Round Of Discussions
Collapse
X
-
Originally posted by Grinch View PostGranted it was over a year ago that I ported some code of mine from C to Rust in order to get a feel for the language, but yes the difference in compilation time was very noticeable then. Even this very RFC we are discussing brings it up as a negative:
So it sounds like it's very much still an issue.
Comment
-
Originally posted by Luke_Wolf View Post
Slower != Slow, and especially Slower != Very Slow. Pure C happens to be on the faster end of things as far as compile times go, but Rust is comparable to most other compiled languages that people actually use (C++, C#, Java, etc). Most of the complaints and the meme of "rust being slow to compile" is coming from Python and Go folks, who will never be satisfied. Again though if you're abusing macros now you can start having issues, but that's like abusing templates in C++ and then complaining about compile times.
As you can see it's pretty steady improvement over time and cumulatively quite significant. There's actually another 10% improvement close to landing as well.
Comment
-
Originally posted by Grinch View PostGuess what the Linux kernel is written in.
What about same proposal but instead you can choose either a compiler that's 50% faster, and produces executables that run the same speed as the other, but the other one can remove 65-90% of all security bugs in the final executable?
Now let's make this more real world, let's hold the kernel at 30 million lines and say it takes 30 minutes to build on an arbitrary system now lets make the rust code 3 million lines and to make it favorable to you let's say it takes twice as long to compile rust as it does C, you added a whole 6 minutes to the build. Certainly nothing to cry over on a compile that takes a half hour anyway.
This is what you're complaining about.
Now if this was Scala where sbt takes a good 5 minutes on its own to start up before you can even run your compile command I might be more understanding, but that's not what we're talking about here.
- Likes 1
Comment
-
As a C programmer I resist the idea of adding Rust, when I can literally predict the resulting assembly language of my C program; due to my safe programming practices, and avoidance of ill formed code.
But when I try to argue against Rust I find things such as Oso Polar which bolster its inclusion; still I resist.
Comment
-
Originally posted by Luke_Wolf View Post
Alright let me ask you this: would you compile your kernel with a compiler that's 50% faster for an executable that runs half as fast or would you use a compiler that's more complicated and thus takes longer, producing optimized code?
Originally posted by Luke_Wolf View Post
What about same proposal but instead you can choose either a compiler that's 50% faster, and produces executables that run the same speed as the other, but the other one can remove 65-90% of all security bugs in the final executable?
Originally posted by Luke_Wolf View Post
Certainly nothing to cry over on a compile that takes a half hour anyway.
I'm not saying Rust being slower in compilation is a deal-breaker, if it was then this discussion would be over as a Rust compiler will be slower than a C compiler, given that it does more work due to more complex abstractions. It IS however a factor on the negative side, which the Rust proponents who wrote this RFC themselves acknowledge.
Comment
Comment