Skip to main content

calybris_core/
lib.rs

1//! # Calybris Core
2//!
3//! Deterministic proof-carrying decision kernel, HMAC-SHA256 hash-chained
4//! write-ahead log, CAS atomic budget engine, and fixed-point financial proofs.
5//!
6//! - **`kernel`**: Allocation-free integer decision kernel (8.6M decisions/sec)
7//! - **`verify`**: Canonical digests, replay verification, correctness certificates
8//! - **`finance`**: Ledger snapshots and fixed-point conservation proofs for pre-trade guard primitives
9//! - **`wal`**: Generic tamper-evident hash-chained WAL with optional HMAC keying
10//! - **`budget`**: Per-tenant atomic budget management with conservation invariant
11//!
12//! ```no_run
13//! use calybris_core::kernel::*;
14//! use calybris_core::verify::{audit_bundle, verify_decision, VerifyResult};
15//! use calybris_core::finance::certify_ledger;
16//! use calybris_core::budget::BudgetEngine;
17//! #[cfg(feature = "wal")]
18//! use calybris_core::wal::WalWriter;
19//! ```
20
21#![forbid(unsafe_code)]
22
23mod sync;
24
25/// Per-tenant atomic budget engine with CAS reservation.
26pub mod budget;
27/// Canonical SHA-256 digests for audit binding.
28pub mod digest;
29/// Fixed-point financial layer: ledger digest and conservation proofs.
30pub mod finance;
31/// Allocation-free prescriptive decision kernel.
32pub mod kernel;
33/// Decision verification, replay, and correctness certificates.
34pub mod verify;
35/// HMAC-SHA256 hash-chained write-ahead log.
36#[cfg(feature = "wal")]
37pub mod wal;