Skip to main content

vlo_kernel/
lib.rs

1//! The Vlo kernel: a pure, event-sourced state machine (see `docs/workflows.md` for the
2//! reducer contract and `docs/kernel-protocol.md` for the wire protocol).
3//!
4//! Zero I/O, zero clock, zero randomness of its own. Everything it needs arrives on the
5//! event (`ts_ms`, `random`) or in the run's persisted state, and everything it decides
6//! leaves as a declarative write-set the host applies atomically. That is what lets the
7//! same logic run on wasm in Node today and natively in a Durable Object later.
8//!
9//! Errors are values: no input can make the kernel panic, which matters because the
10//! wasm profile builds with `panic = "abort"`.
11
12#![forbid(unsafe_code)]
13#![warn(missing_docs)]
14
15pub mod api;
16pub mod canonical;
17pub mod classify;
18pub mod error;
19pub mod guards;
20pub mod hash;
21pub mod ids;
22pub mod prepare;
23pub mod reduce;
24pub mod refold;
25pub mod retry;
26pub mod step_machine;
27pub mod steps;
28pub mod validate;
29
30mod commands;
31mod events;
32mod lifecycle;
33
34pub use api::{version, FEATURES};
35pub use commands::{DEFAULT_LEASE_TTL_MS, DEFAULT_QUEUE};
36pub use error::{code, KResult};
37pub use hash::state_hash;
38pub use ids::derive_ids;
39pub use prepare::prepare_event;
40pub use reduce::reduce_step;
41pub use refold::refold_check;
42pub use retry::plan_retry;
43pub use validate::validate_event;