interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

branch main Branches Tags History

aien-sovereign-core-mv / crates / aien-kv-store / src / lib.rs

63 lines · 2316 bytes Raw Blame History
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Drake Stapleton (AIEN / aien-dev)
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Persistent KV cache: versioned chunk identity, the 256-byte record header in
17//! its 4096-byte region, validation, and the `KvStore` contract with a
18//! deterministic fake adapter. Binding design: `docs/adr/0003-persistent-kv-identity-storage-contract-and-ownership.md`.
19//!
20//! `no_std` + `alloc` for identity, codec, validation, pinned views and the
21//! trait. The `std` feature (default) adds the in-memory fake adapter.
22
23#![cfg_attr(not(feature = "std"), no_std)]
24
25extern crate alloc;
26
27pub mod coalesce;
28pub mod error;
29#[cfg(feature = "std")]
30pub mod fake;
31pub mod holder;
32#[cfg(all(feature = "std", unix))]
33pub mod host_fs;
34pub mod identity;
35pub mod index;
36pub mod pin;
37pub mod record;
38#[cfg(feature = "std")]
39pub mod seal;
40#[cfg(all(test, feature = "std", unix))]
41mod seal_budget_tests;
42#[cfg(all(test, feature = "std", unix))]
43mod seal_nonce_tests;
44pub mod store;
45pub mod validate;
46#[cfg(feature = "std")]
47pub mod worker;
48
49pub use error::KvError;
50pub use identity::{
51 chunk_chain, chunk_key, BackendFormat, ChunkKey, ComputeConfig, EngineConfig, EngineIdentity,
52 HiddenAct, KvDtype, LayoutStrides, NamespaceFields, NamespaceId, RopeScaling, WeightFormat,
53};
54pub use pin::{HolderGuard, HolderHandle, PinnedDest, PinnedSource};
55pub use record::{
56 payload_root, segment_count, ChunkHeader, RecordHeader, HEADER_LEN, HEADER_REGION_LEN, MAGIC,
57 MAX_SEGMENTS, PAYLOAD_OFFSET, SEGMENT_TABLE_OFFSET,
58};
59pub use store::{
60 CancelOutcome, Capacity, Completion, DrainReport, Incarnation, JobId, JobStage, KvStore,
61 LandingHolder, PinToken, PublishOutcome, RecoveryProgress, StoreState, Terminal, UnfinishedJob,
62};
63pub use validate::validate_record;