ddd-toolkit-core
Traits and reference implementations for Domain-Driven Design building blocks in Rust: entities, value objects, aggregates, repositories, and event dispatch. No macro dependency - everything here can be implemented by hand.
If you want #[derive(...)] support for the value-object-shaped traits, add
ddd-toolkit-macro
alongside this crate, or depend on
ddd-toolkit instead, which
bundles both behind a single dependency.
What's here
domain-Entity,AggregateRoot,ValueObject/Wrapped,EntityId,SecretVo,EnumVo,DomainEvent,ValidationError.port-Load/Save/Deleterepository traits,EventDispatcher(withDispatchError<E>reporting undelivered events on partial failure),Clock,IdGenerator,PortError.adapter(behind thechrono/uuidfeatures) -SystemClock,UuidV4Generator,UuidV7Generator.mock-InMemoryStore(aLoad/Save/Deleteimplementation backed by aHashMap),FixedClock,FixedIdGenerator.application-UseCase.
Example
use ;
use Display;
;
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.