Skip to main content

Crate azoth

Crate azoth 

Source
Expand description

Axiom: A TEE-safe, high-performance storage subsystem

Axiom provides a complete storage solution with:

  • Canonical store: Transactional KV + append-only event log (LMDB)
  • Projection store: Queryable SQL tables derived from events (SQLite)
  • Projector: Event processing with batching and backpressure
  • Migrations: Schema versioning and evolution
  • Event handlers: Extensible event processing pipeline

§Quick Start

use azoth::prelude::*;

// Open database
let db = AzothDb::open("./data")?;

// Write state + events atomically
let mut txn = db.canonical().write_txn()?;
txn.put_state(b"key", b"value")?;
txn.append_event(b"event_data")?;
txn.commit()?;

// Run projector
db.projector().run_once()?;

Re-exports§

pub use backup::BackupOptions;
pub use backup::EncryptionKey;
pub use db::AzothDb;
pub use dead_letter_queue::DeadLetterQueue;
pub use dead_letter_queue::FailedEvent;
pub use event_format::Event;
pub use event_format::EventCodec;
pub use event_format::EventTypeRegistry;
pub use event_format::JsonCodec;
pub use event_format::MsgPackCodec;
pub use event_handler::BatchConfig;
pub use event_handler::BatchEvent;
pub use event_handler::EventHandler;
pub use event_handler::EventHandlerRegistry;
pub use event_processor::ErrorAction;
pub use event_processor::ErrorStrategy;
pub use event_processor::EventProcessor;
pub use event_processor::EventProcessorBuilder;
pub use event_processor::ShutdownHandle;
pub use migration::Migration;
pub use migration::MigrationManager;
pub use transaction::PreflightContext;
pub use transaction::Transaction;
pub use transaction::TransactionContext;
pub use typed_values::Array;
pub use typed_values::Set;
pub use typed_values::TypedValue;
pub use typed_values::I256;
pub use typed_values::U256;

Modules§

backup
Backup and restore with optional encryption and compression
db
Unified Axiom database interface
dead_letter_queue
Dead Letter Queue
event_format
Event format with structured payloads
event_handler
Event handler system
event_processor
Continuous Event Processor
migration
Database migration system
prelude
Axiom Prelude
transaction
Enhanced transaction API with preflight, state updates, and event logging
typed_values
Typed value support for the KV store

Macros§

migration
Helper macro to define a migration
simple_handler
Helper macro to create a simple event handler

Structs§

BackupInfo
Information about a backup operation
BackupManifest
Backup manifest for deterministic restore
CanonicalConfig
Configuration for canonical store
CanonicalMeta
Metadata about the canonical store state
CommitInfo
Information about a committed transaction
DecodedEvent
Decoded event representation
LmdbCanonicalStore
LMDB-backed canonical store
LockManager
Lock manager for stripe locking during preflight phase
PreflightResult
Preflight validation result
ProjectionConfig
Configuration for projection store
Projector
Projector: consumes events from canonical store and applies to projection
ProjectorConfig
Configuration for the projector
ProjectorStats
SqliteProjectionStore
SQLite-backed projection store

Enums§

AzothError
SyncMode
SynchronousMode

Traits§

CanonicalStore
Canonical store: transactional KV + append-only event log
CanonicalTxn
Transaction for canonical store operations
EventApplier
Event applier: apply events to projection store
EventDecoder
Event decoder: convert raw bytes to structured events
EventIter
Iterator over events in the canonical store
ProjectionStore
Projection store: SQL database for derived tables
ProjectionTxn
Transaction for projection store operations

Type Aliases§

EventBytes
Raw event bytes (opaque to storage layer)
EventId
Event identifier - strictly monotonic u64
Result