The Scarb team is working hard to bring a functional equivalent of Rust’s procedural macros to Cairo. This effort will, for the first time in Cairo’s history, give all programmers the ability to write their own code generation for their project’s needs. Please take a look at the design document attached below. The macros are designed to be written in Rust, then compiled and distributed through Scarb. The procedural macro will be executed as a shared library loaded by Scarb dynamically. We would welcome any feedback you may have to best accommodate your use cases!
You can see the design document here: scarb/design/01-proc-macro.md at maciektr/proc-macro-design · software-mansion/scarb · GitHub
Please fell free to submit any feedback through this pull request: Procedural macros design document by maciektr · Pull Request #1109 · software-mansion/scarb · GitHub