Skip to main content

kmp_adapter_embedded/
lib.rs

1//! Embedded edition storage adapters ([historical ADR-009](https://github.com/underpass-ai/kmp/blob/v0.5.0/archive/docs/adr/ADR-009-embedded-storage-engine.md)).
2//!
3//! One [`EmbeddedKernelStore`] opens one data directory
4//! ([historical ADR-012](https://github.com/underpass-ai/kmp/blob/v0.5.0/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//! [historical ADR-010](https://github.com/underpass-ai/kmp/blob/v0.5.0/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 is the only active engine and is fsync-durable, so
10//! the crash contract is: no data loss beyond the in-flight event, no duplicate
11//! application on replay. Unsupported store formats are detected and rejected
12//! without being touched.
13//!
14//! The observable semantics are pinned by `kmp-conformance`: the same
15//! suite that certifies the in-memory kernel store and the Neo4j/Valkey
16//! adapters runs against this store.
17
18mod adapter;
19
20pub use adapter::{
21    BUNDLE_FORMAT_VERSION, BundleEventRange, BundleHeader, EVENT_FORMAT_VERSION,
22    EmbeddedKernelStore, ImportReport, ProjectionRebuildReport, QualityTelemetryRetention,
23    SUPPORTED_FORMAT_VERSION, SqliteQualityTelemetryReader, SqliteQualityTelemetryWriter,
24    StorageEngine, StoreMigrationReceipt, format_version_path, merge_bundles,
25    quality_telemetry_path, read_stamped_version, store_file_path_for, validate_store_layout,
26    verify_bundle,
27};