36

Always good to read about how you can speed up compile times. I mean, sword fighting on office chairs are all fun, but still....

top 3 comments
sorted by: hot top controversial new old
[-] secana@programming.dev 10 points 7 months ago

If that really works without any drawbacks, I hope it gets merged into Rust main.

[-] calcopiritus@lemmy.world 6 points 7 months ago

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.

[-] gopher_protocol@programming.dev 5 points 7 months 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.

this post was submitted on 20 Mar 2024
36 points (95.0% liked)

Rust

5938 readers
1 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS