4/13/2026 at 10:55:58 PM
Can you (err... buildcache) cache Rust proc-macros? I've been battling this with sccache and I'm now maintaining a 10-patch deep stack for the next.js build CI.Windows builds were ridiculously poor on cache hits rates too because of non-determinism that was not able to figure out.
I'd be happy to test it out.
by mmastrac
4/13/2026 at 11:03:20 PM
There was an experimental PR that treats proc macros as idempotent with the corresponding colpike speed up. I don't know what happened with it, and stabilization required a lot of design work to not break backcompat. But this is something in the team's radar.by estebank
4/13/2026 at 11:52:42 PM
Would it be possible to do somethign like editions for proc macros, or have crates establish "this is a v2 proc macro" or something? There are a lot of things I'd love to see change in a v2 but it'd all be breaking.by staticassertion
4/14/2026 at 2:06:47 AM
Yes, I think here are workable designs.by estebank
4/13/2026 at 11:56:41 PM
Do you have a link for this one? Would love to see it.by mmastrac
4/14/2026 at 2:29:59 AM
This is not the one I remember but another one that does part of what I'm describing.by estebank
4/14/2026 at 12:18:42 AM
what do you mean by idempotent and colpike?by NooneAtAll3
4/14/2026 at 2:25:59 AM
Idempotent as in if the token stream in the input doesn't change, the cached result of the previous macro expansion is used during incremental, instead of being pessimistic and rerunning the macro.Colpike as in compile typo.
by estebank