3 ms·
Have you compiled the Linux kernel before? I doubt Rust will be the bottleneck, it's a massive project - a tiny fraction being in Rust will be a blip.
by staticassertion 5y ago
Have you compiled the Linux kernel before? I doubt Rust will be the bottleneck, it's a massive project - a tiny fraction being in Rust will be a blip.
- caslon 5y agoPretty frequently, yes. It doesn't take that long on modern, moderately-powered devices. Even when I was using a mid-tier device from a decade ago, compilation time was still around half an hour, which was less than most Rust projects I've encountered are on modern and reasonably high-end hardware, despite doing much more and being much larger.
- staticassertion 5y agoYep, 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.
- bluecalm 5y agoMan, 10KLOC is a very small project. Obviously it compiles quickly. Linux kernel is almost 30 million lines of code.
- staticassertion 5y agoYes... 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?
- bluecalm 5y agoIf 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.
- staticassertion 5y ago1. 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.
- himujjal 5y agoI 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.
- staticassertion 5y agoWell, 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.
- jstrong 5y agoI've been coding predominantly in rust since 2018 and have never encountered a build time > 10min.
- LandR 5y agoWorked at a place where our c# build times for a large project, many millions of loc, were 40 mins or so.