1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # kora-core
//!
//! Core data structures, shard engine, and memory management for Kōra.
//!
//! This crate has **zero** workspace dependencies — it sits at the bottom of
//! the workspace dependency graph and every other Kōra crate builds on top of
//! it. The main abstractions are:
//!
//! - `types::Value` — the polymorphic value representation (inline strings,
//! heap strings, integers, lists, sets, hashes, sorted sets, streams, vectors).
//! - `types::CompactKey` / `types::KeyEntry` — compact key storage with
//! per-key metadata (TTL, LFU counter, storage tier).
//! - `shard::ShardStore` — a single-threaded key-value store that executes
//! commands against its partition of the keyspace.
//! - `shard::ShardEngine` — coordinates N worker threads, each owning one
//! `ShardStore`, and routes commands by key hash.
//! - `command::Command` / `command::CommandResponse` — the full command
//! vocabulary and response types that bridge the protocol layer and the engine.
//!
//! The `simulation` feature gate enables a deterministic simulation testing
//! framework (see the `sim` module).
/// Core error types.
/// Key and value types for the cache engine.
/// Command and response types.
/// Key hashing and shard routing.
/// Per-thread shard storage and the coordinating engine.
/// Deterministic simulation testing framework.