2 ms·
> We're using rustc v1.83, and despite having a 64-core machine with 128 threads, Rust barely puts any of them to work. > That’s right — 1,106 crates! Sounds e
by hu3 2y ago
> We're using rustc v1.83, and despite having a 64-core machine with 128 threads, Rust barely puts any of them to work.
> That’s right — 1,106 crates! Sounds excessive? Maybe. But in the end this is what makes rustc much more effective.
> What used to take 30–45 minutes now compiles in under 3 minutes.
I wonder if this kind of trick can be implemented in rustc itself in a more automated fashion to benefit more projects.
- zwnow 2y ago1106 crates? Are they sure this is not a Javascript project?
- faitswulff 2y agoThey compile their customers' SQL to Rust code. Hence the preponderance of crates. It's a somewhat unique scenario.
- lsuresh 2y agoThat's correct. These aren't external dependencies but a dataflow graph being split into crates.
- pcwalton 2y ago> I wonder if this kind of trick can be implemented in rustc itself in a more automated fashion to benefit more projects. It partially is, with codegen units. The problem is that you can't generally do that until codegen time, because of circular dependencies.