3 ms·
You can't build an IDE that definitely just "understands Rust macros" since procedural macros in particular are in effect modifying your compiler. Maud is a pro
by tialaramex 4y ago
You can't build an IDE that definitely just "understands Rust macros" since procedural macros in particular are in effect modifying your compiler. Maud is a proc macro.
Mara's whichever_compiles! macro for example: https://github.com/m-ou-se/whichever-compiles https://github.com/m-ou-se/whichever-compiles -- that macro is forking your compiler to try out all the branches and throwing away branches which caused a compile error.
Clearly your IDE should throw its hands up and say, I don't understand what this does, I give up.
In general doing something useful with Rust macros is a more tractable problem for an IDE than say the C pre-processor, because Rust's macros have a stronger syntax, but the proc macro is potentially much too powerful / dangerous to try to evaluate.