rustc has a reputation for slow compile times, but I wanted to find out how my experiences compare to others.
I have a ~8,000 line Rust project that, on my little laptop, takes about a minute to compile on 1.22.1, and 3-4 minutes to compile on nightly. Incremental compilation may take that down 10% or so.
If I compile a C project of similar functionality and ~14,000 lines of code, it compiles in 6 seconds. And, most significantly, if I just
touch a single file and recompile the project, it compiles in less than half a second.
Is this comparable to what other people are experiencing? My Rust project does use generics pretty heavily and uses macros to generate a lot of code, so that ~8,000 line statistic is misleading, but still, this seems very slow to me. I consider the nightly compiler basically unusable: especially on a project of this relatively small size, I have to be able to make small changes and test them very quickly. 4 minutes is bonkers.