3 ms·
Funnily enough, total code size remaining constant, it is preferable to have more smaller crates than a few big ones. This is because the compilation unit in th
by estebank 4y ago
Funnily enough, total code size remaining constant, it is preferable to have more smaller crates than a few big ones. This is because the compilation unit in the Rust compiler is the crate, so having more independent crates allows for parallelization during compilation. You can argue that rustc should have either tools to help you split your large crates and/or automatically detect when a single crate has non-overlapping elements that could be compiled concurrently (but the former is not something anyone is working on to my knowledge and the later has the risk of small refactors significantly affecting compile times in an opaque way).