3 ms·
Shouldn’t it work in any IDE that understands Rust macros?
by coffeeblack 4y ago
Shouldn’t it work in any IDE that understands Rust macros?
- msk-lywenn 4y agoIs there any? I don't think there is a real meaning to "understanding rust macros", as they define something completely new.
- tialaramex 4y agoYou 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.