Skip to main content

Crate zement

Crate zement 

Source
Expand description

§Zement

Enterprise-grade, Rust-native CQRS and Event Sourcing framework.

Zement provides a strict Hexagonal Architecture (Ports and Adapters) for building event-sourced systems in Rust. The core has zero infrastructure dependencies — adapters implement the SPIs defined in zement-core.

§Quick Start

use zement::core::aggregate::{Aggregate, AggregateError};
use zement::core::command::Command;
use zement::core::event::Event;
use zement::memory::store::InMemoryEventStore;
use zement::core::spi::event_store::EventStore;
use uuid::Uuid;

// Your aggregate, commands, and events implement the core traits.
// Use InMemoryEventStore for testing, Postgres for production.

§Crate Architecture

CrateRole
zementFacade — re-exports everything below
zement-coreDomain traits and SPIs
zement-memoryIn-memory EventStore for testing

§See Also

  • zement_core — Core traits: Aggregate, Command, Event, EventStore
  • zement_memory — InMemoryEventStore implementation

Re-exports§

pub use zement_core as core;
pub use zement_memory as memory;