mnesis-macros
Procedural macros for mnesis. Three macros, zero boilerplate.
#[derive(DomainEvent)]
Derive on an enum. Generates Message + DomainEvent impls with name() returning variant names as &'static str.
#[mnesis::aggregate]
Attribute macro on a unit struct. Generates impl Aggregate plus a convenience BankAccount::new(id) -> AggregateRoot<Self> constructor; the struct stays a bare marker. Implement Handle<C> on the marker as handle(state, cmd) -> events.
;
#[mnesis::transforms]
Attribute macro on an impl block. Generates an Upcaster impl for schema evolution. Transform functions are annotated with #[transform(event = "...", from = N, to = N+1)].
MSRV & stability
MSRV 1.95 (pinned stable). 1.0 tier, version-locked to mnesis with an exact = pin. See STABILITY.md.
License
Licensed under your choice of MIT or Apache-2.0.