I'm starting to experiment with macros, and wanted to try building an attribute proc-macro. I added
proc-macro = true to my .toml file, but I got the following error:
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
I did some digging online to understand this error a little better, and found a helpful answer about this on StackOverflow.
it sounds like proc macros are essentially extensions for the compiler, and not the implementing project code, so the macro source is something that's actually separate from my implementing crate. My project is set up as a Rust workspace, so I was going to create a new create specifically for my procedural macros, then have any other crates in that workspace depend on that crate as necessary.
Is this generally a good approach to breaking up my project structure when developing procedural macros?