5 ms·
Pretty 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
by caslon 6y ago
Pretty 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 6y 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 6y agoMan, 10KLOC is a very small project. Obviously it compiles quickly. Linux kernel is almost 30 million lines of code.
- staticassertion 6y 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 6y 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 6y 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 6y 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 6y 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 6y agoI've been coding predominantly in rust since 2018 and have never encountered a build time > 10min.
- LandR 6y agoWorked at a place where our c# build times for a large project, many millions of loc, were 40 mins or so.