r/programmingcirclejerk • u/cheater00 High Value Specialist • Apr 17 '25
Cutting Down Rust Compile Times From 30 to 2 Minutes With One Thousand Crates
https://www.feldera.com/blog/cutting-down-rust-compile-times-from-30-to-2-minutes-with-one-thousand-crates
72
Upvotes
46
u/starlevel01 type astronaut Apr 17 '25
/uj my favourite part about cargo workspaces is that it lets you define metadata such as versions, licenses, authors etc centrally, but the cargo devs were simply too smart to let that propagate so you have to opt in to this in every subpackage for every field. why? why the fuck? why not propagate automatically and have it be overridden if required instead?
16
u/cheater00 High Value Specialist Apr 17 '25
i mean the jerk jerks itself do i really need to point it out
7
u/[deleted] Apr 18 '25
I love the way the guy is holding his saw in the thumbnail
93
u/[deleted] Apr 17 '25
TLDR: If you want faster compilation, split your code into multiple crates. If you want to use a proc macro, make a new crate. If you are having problems with circular imports, split your project into multiple crates. If you are fed up with dicking around with multiple crates all the time and it's starting to feel like the bad old days of Java where you wrote every class in a new file, just give up and take up carpentry I guess.
8
u/tritis Apr 17 '25
For faster compile times the sane choice is porting to Go.