Skip to main content

Crate kmp_embedded

Crate kmp_embedded 

Source
Expand description

Embedded edition composition root (ADR-013): wires the application services over the redb store with synchronous in-process projection, and resolves the data directory per the ADR-012 contract. No transport, no infrastructure clients.

Structs§

EmbeddedKernel
One opened embedded kernel: the composed service plus the store handle for operational tooling (replay, stats, compaction).

Enums§

ResolvedDataDir
Where the data directory came from — logged at startup so the winning resolution rule is always visible.

Constants§

DATA_DIR_ENV
Explicit data directory override (ADR-012 rule 1).
SUPPORTED_FORMAT_VERSION
Store format version this binary reads and writes.

Functions§

resolve_data_dir
ADR-012 resolution: env override > project .kernel/ > per-user default. Pure function for testability; resolve_data_dir_from_env feeds it from the process environment.
resolve_data_dir_from_env
Resolves from the process environment and prepares the directory: creates it and, for project-scoped dirs, drops a self-ignoring .gitignore so local memory never enters version control by accident.

Type Aliases§

EmbeddedMemoryService
The KMP memory facade composed over the embedded store: every port is the same single-file redb store, and ingest projects synchronously in-process, which is what makes read_after_write_ready unconditionally true.