Any chance we could get macros that do physical-code-on-machine codegen? (Like Google protobuf?)
I love Serde to death, but the compile times are getting absolutely absurd. It's painful to sit around for three minutes after a single code change.
If I could use Serde with all of its features, but have it write out the source to disk so I can commit it to our repo, that seems like it would vastly improve compile times. During development, I'd love to be able to change our API definition and be able to rapidly test changes. The productivity loss with the current state of Serde and proc macros sucks.
Any chance of something like that happening? I'd use it in a heartbeat. I would donate to fund this.
I am very much a fan of codegen by generating code and saving it to disk and advocate for it in place of `build.rs` wherever possible. Unsure what the path forward for doing that for proc-macros would look like. There is talk of proc-macro expansion caching so rustc can decide when it needs to re-run proc-macros. It requires more information from proc-macros and performance results have been a mixed bag.
What I am most looking forward to help with this are:
- reflection which is being worked on, see https://rust-lang.github.io/rust-project-goals/2025h2/reflec...
- declarative attribute and derive macros which have an initial implementation but more work around them is needed to make them viable