Skip to main content

Crate kora_core

Crate kora_core 

Source
Expand description

§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).

Modules§

command
Command and response types. Command and response types for the Kōra engine.
error
Core error types. Core error types for the Kōra engine.
hash
Key hashing and shard routing. Key hashing and shard routing.
shard
Per-thread shard storage and the coordinating engine. Per-thread shard storage and the coordinating shard engine.
types
Key and value types for the cache engine. Key and value types for the Kōra cache engine.