3 ms·
>Almost nothing compiles in seconds You just made me feel glad I'm mainly a C dev these days. Since you typically rebuild one C file at a time (unless you make
by simias 8y ago
>Almost nothing compiles in seconds
You just made me feel glad I'm mainly a C dev these days. Since you typically rebuild one C file at a time (unless you make changes to header files potentially) compilation times of a fraction of a second are the norm here.
That being said I agree with you that between 1mn compile time and 1mn10s compile time it might not make all that much of a difference in practice.
However one thing Rust does that mitigates these problems a little is that diagnostics and errors are typically generated early in the build process, so generally if you see that it started off well you can focus your attention elsewhere (or even interrupt the build early to start a new one if you make small, incremental changes).
In this context I assume that the NLL checker added time to this early phase of the boot process and it might be worth optimizing that bit in particular. If you have a lifetime issue you don't want to wait 30s to have your build error.
- paavohtl 8y ago> However one thing Rust does that mitigates these problems a little is that diagnostics and errors are typically generated early in the build process, so generally if you see that it started off well you can focus your attention elsewhere (or even interrupt the build early to start a new one if you make small, incremental changes). You can also run the compiler with `cargo check` and it only does type- and borrow checking. I haven't worked on any huge Rust codebases, but in my experience it usually takes only a fraction of a second at best or a few seconds at worst.
- jblindsay 8y agoI have a large (~140k SLOC) geospatial analysis project written entirely in Rust, and I can confirm that it takes me about 3.5 min to cargo build --release on my Macbook pro and only about 12 s to cargo check. It is a life saver for productivity although I would still welcome a reduction in those compile times. The data sets that I use to test new tools are often so large that cargo build is not an option for testing. I have to use release mode. I have really enjoyed programming in Rust since starting the project a year and a half ago. If there is one thing I could change about the language it would be the compile times.