mynt 🍬 - a refreshing error handling crate for proc macros
mynt provides a straightforward way to handle errors
based on the nightly diagnostic interface.
It takes a different approach compared to manyhow.
Instead of returning results, we return token streams and instead emit errors externally and continue, only quitting if the error is fatal.
There is no passing around emitters or writing to dummy streams if an error occurs.
It is inspired by proc-macro-error3,
but with some changes:
- Uses declarative macros instead of procedural macros for lower compile times
- All dependencies are optional
- Removes dummy streams (instead opting for the developer to emit as much as possible)
- Support for
synandproc-macro2, as well as support forvenialanddarling - Macros for emitting diagnostics, bailing, quitting, and writing assertions
- Terminal colors for the stable channel fallback with
yansi