Skip to main content

kmp_adapter_embedded/
lib.rs

1//! Embedded edition storage adapters ([ADR-009](../../../docs/adr/ADR-009-embedded-storage-engine.md)).
2//!
3//! One [`EmbeddedKernelStore`] opens one data directory
4//! ([ADR-012](../../../docs/adr/ADR-012-embedded-data-directory.md) layout:
5//! `FORMAT_VERSION` + `store/kernel.redb`) and implements every persistence
6//! port the kernel needs: graph reads (materialized adjacency per
7//! [ADR-010](../../../docs/adr/ADR-010-embedded-graph-representation.md)),
8//! node details, the append-only context event log, projection runtime state,
9//! and snapshots. Commits are fsync-durable (redb immediate durability), so
10//! the crash contract is: no data loss beyond the in-flight event, no
11//! duplicate application on replay.
12//!
13//! The observable semantics are pinned by `kmp-conformance`: the same
14//! suite that certifies the in-memory kernel store and the Neo4j/Valkey
15//! adapters runs against this store.
16
17mod adapter;
18
19pub use adapter::{
20    BUNDLE_FORMAT_VERSION, BundleHeader, EVENT_FORMAT_VERSION, EmbeddedKernelStore, ImportReport,
21    ProjectionRebuildReport, QualityTelemetryRetention, RedbQualityTelemetryReader,
22    RedbQualityTelemetryWriter, SUPPORTED_FORMAT_VERSION, StorageEngine, StoreMigrationReceipt,
23    format_version_path, quality_telemetry_path,
24};