kmp_adapter_embedded/lib.rs
1//! Embedded edition storage adapters ([ADR-009](../../../archive/docs/adr/ADR-009-embedded-storage-engine.md)).
2//!
3//! One [`EmbeddedKernelStore`] opens one data directory
4//! ([ADR-012](../../../archive/docs/adr/ADR-012-embedded-data-directory.md) layout:
5//! `FORMAT_VERSION` plus an engine-named file under `store/`) and implements every persistence
6//! port the kernel needs: graph reads (materialized adjacency per
7//! [ADR-010](../../../archive/docs/adr/ADR-010-embedded-graph-representation.md)),
8//! node details, the append-only context event log, projection runtime state,
9//! and snapshots. SQLite and the redb compatibility engine are fsync-durable,
10//! so 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, BundleEventRange, BundleHeader, EVENT_FORMAT_VERSION,
21 EmbeddedKernelStore, ImportReport, ProjectionRebuildReport, QualityTelemetryRetention,
22 RedbQualityTelemetryReader, RedbQualityTelemetryWriter, SUPPORTED_FORMAT_VERSION,
23 StorageEngine, StoreMigrationReceipt, format_version_path, merge_bundles,
24 quality_telemetry_path, read_stamped_version, store_file_path_for, verify_bundle,
25};