▲ 37 ▼ BLOG: How I reduced (incremental) Rust compile times by up to 40% (www.coderemote.dev) submitted 2 years ago by snaggen@programming.dev to c/rust@programming.dev 3 comments fedilink hide all child comments Always good to read about how you can speed up compile times. I mean, sword fighting on office chairs are all fun, but still....
[–] secana@programming.dev 10 points 2 years ago (2 children) If that really works without any drawbacks, I hope it gets merged into Rust main. permalink fedilink source hideshow 2 child comments replies: [–] calcopiritus@lemmy.world 6 points 2 years ago (1 child) At least one drawback I can see is that apparently the user has to manually opt-out some macros (the ones that aren't pure) of the caching. Which would require everyone using the rust compiler to know which macros of which crates are pure and which ones not. I guess that the ones writing the macros could do that, but then you rely on library maintainers to know about this specific optimization. It really should be opt-in so the maintainers of libraries that know about the optimization and know that their macro is pure can annotate them as so. permalink fedilink source parent hideshow 1 child comment replies: [–] gopher_protocol@programming.dev 5 points 2 years ago Right, if there was a way to mark them as pure (const fn?) that would solve it, mostly - as long as upstream crates started annotating their proc macros as such. permalink fedilink source parent
[–] calcopiritus@lemmy.world 6 points 2 years ago (1 child) At least one drawback I can see is that apparently the user has to manually opt-out some macros (the ones that aren't pure) of the caching. Which would require everyone using the rust compiler to know which macros of which crates are pure and which ones not. I guess that the ones writing the macros could do that, but then you rely on library maintainers to know about this specific optimization. It really should be opt-in so the maintainers of libraries that know about the optimization and know that their macro is pure can annotate them as so. permalink fedilink source parent hideshow 1 child comment replies: [–] gopher_protocol@programming.dev 5 points 2 years ago Right, if there was a way to mark them as pure (const fn?) that would solve it, mostly - as long as upstream crates started annotating their proc macros as such. permalink fedilink source parent
[–] gopher_protocol@programming.dev 5 points 2 years ago Right, if there was a way to mark them as pure (const fn?) that would solve it, mostly - as long as upstream crates started annotating their proc macros as such. permalink fedilink source parent
all 3 comments