3 ms·
I've been doing more and more Rust. Even with sscache the compile times are not great so for any moderately sized codebase that requires frequent rebuilds I don
by jarym 5mo ago
I've been doing more and more Rust. Even with sscache the compile times are not great so for any moderately sized codebase that requires frequent rebuilds I don't know how everyone else is doing it
- wongarsu 5mo agoI'd assume mostly by avoiding the need for frequent rebuilds. Incremental builds are pretty fast (at least fast enough for my needs on a moderate codebase), full rebuilds can be brutal There are also some optimization tricks related to how you split your code among crates, since a unit of compilation is mostly one crate. Putting your FFI code in a separate crate (-sys crates are the norm) and splitting some of your code in libraries that can be compiled in parallel are the common examples
- unsolved73 5mo agothe linking of the project can take more time than actual compilation. Use the lld linker instead of the default one, see https://kerkour.com/rust-production-checklist#use-the-lld-linker https://kerkour.com/rust-production-checklist#use-the-lld-li...
- peterfirefly 5mo agoOn Windows? Use a dev drive.
- cauterize 5mo agokache helps
- culebron21 5mo agoI split into subcrates and also reduce the number of proc macros (e.g. got rid of Serde).