3 ms·
I guess it depends on what you work on. Both of my primary Rust projects (a .NET metadata parser & a Game Boy emulator) are heavily dependent on macro usage, an
by paavohtl 10y ago
I guess it depends on what you work on. Both of my primary Rust projects (a .NET metadata parser & a Game Boy emulator) are heavily dependent on macro usage, and they implement multiple new macros. Both do lots of binary parsing, so I use bitflags, enum_primitive and bitfield all the time. For instance, I use this [1] two-macro monstrosity to parse tagged unions from the CLR metadata.
[1] https://github.com/paavohuhtala/clri/blob/b8a9057397ef95c0deaf9b8b5bfd6f58f8001691/src/metadata/tables.rs#L342 https://github.com/paavohuhtala/clri/blob/b8a9057397ef95c0de...
- steveklabnik 10y agoYup, I do think it varies this way.