Skip to main content

azoth_core/
lib.rs

1//! Axiom Core: Traits and types for the axiom storage subsystem
2//!
3//! This crate defines the core abstractions for a TEE-safe, high-performance
4//! storage layer with:
5//! - Canonical store (LMDB): Transactional KV + append-only event log
6//! - Projection store (SQLite): Queryable SQL tables derived from events
7//! - Projector: Consumes events and updates SQL projections
8//! - Backup/restore: Deterministic snapshotting with manifest
9//!
10//! Key features:
11//! - Three-phase transactions: Async preflight → Fast sync commit → Async projection
12//! - Stripe locking: Parallel preflight validation for non-conflicting keys
13//! - Pausable ingestion: Safe backups with no partial state
14//! - Deterministic replay: Any projection can be rebuilt from events
15
16pub mod config;
17pub mod error;
18pub mod event_log;
19pub mod lock_manager;
20pub mod traits;
21pub mod types;
22
23pub use config::{CanonicalConfig, ProjectionConfig, ProjectorConfig};
24pub use error::{AzothError, Result};
25pub use event_log::{EventLog, EventLogIterator, EventLogStats};
26pub use lock_manager::LockManager;
27pub use traits::{
28    CanonicalStore, CanonicalTxn, DecodedEvent, EventApplier, EventDecoder, EventIter,
29    PreflightResult, ProjectionStore, ProjectionTxn,
30};
31pub use types::{BackupInfo, BackupManifest, CanonicalMeta, CommitInfo, EventBytes, EventId};