News for hackers. Stuff that matters.
Re:Linus Torvalds on Rust support in kernel by staticassertion on Friday April 16, 2021 @12:17PM (#26835790)
Yep, that sounds exactly right to me - about 30 minutes on older hardware. That's very odd to me that you have 30 minute rust build times - as someone who works on a rust project professionally, with 10KLOC, that isn't my experience at all. If Rust gets into the kernel I would expect it to account for <1% of the code, so even if it were 100x slower to compile, which it isn't, I don't see it having an impact.
Re:Linus Torvalds on Rust support in kernel by himujjal on Friday April 16, 2021 @02:35PM (#26837471)
I wrote 10kLOC last week. Most of the code didn't require much extra thinking, it was mostly a translation of an old TypeScript project to Zig. But measuring compile times with 10kLOC is really not a good argument.
Re:Linus Torvalds on Rust support in kernel by staticassertion on Friday April 16, 2021 @02:54PM (#26837665)
Well, 15KLOC, and of course not including dependencies. But my point was that there will be a tiny, tiny amount of Rust in the kernel by comparison to the 10s of millions of lines of C code. Rust would have to compile radically slower than C, like hundreds or thousands of times slower, in order to be a limiting factor.
Re:Linus Torvalds on Rust support in kernel by bluecalm on Friday April 16, 2021 @01:24PM (#26836680)
Man, 10KLOC is a very small project. Obviously it compiles quickly. Linux kernel is almost 30 million lines of code.
Re:Linus Torvalds on Rust support in kernel by staticassertion on Friday April 16, 2021 @02:52PM (#26837648)
Yes... exactly. The Linux Kernel is 30 million lines of code - so how exactly will some minimiscule-by-comparison amount of Rust code slow down compile times considerably?
Re:Linus Torvalds on Rust support in kernel by bluecalm on Friday April 16, 2021 @05:09PM (#26839109)
If it's always going to be miniscule then why bother? If it has potential to grow to something not miniscule then it's important to it compiles quickly.
Re:Linus Torvalds on Rust support in kernel by staticassertion on Saturday April 17, 2021 @05:16PM (#26847532)
1. Even if we start today, and all new code is written in Rust, it will be years before Rust has an impact on compile time.

2. A relatively small portion of code can account for the majority of exploited vulnerabilities.

3. Nothing about Rust is fundamentally slow with regards to compile times. There's plenty of time to work on it, and we've already seen significant efforts make headway.

Compile times are a nonissue in any practical sense for this work.