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 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. The redb adapter remains private legacy machinery
12//! for reading and migrating format-1 stores.
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, legacy_quality_telemetry_path,
25 merge_bundles, quality_telemetry_path, read_stamped_version, store_file_path_for,
26 verify_bundle,
27};