Skip to main content

recon_core/
lib.rs

1//! Core abstractions for sans-IO distributed protocols.
2//!
3//! A protocol here is a synchronous state machine: it consumes events and emits effects.
4//! It never awaits, never reads a clock, never draws ambient randomness, and never performs
5//! input or output. Everything it needs from the world arrives through [`Cx`], which is what
6//! makes a run reproducible from a seed and a protocol testable as a plain function.
7//!
8//! Layers compose by ownership: a parent holds its child as a typed field and re-wraps the
9//! child's effects into its own terms via [`Cx::with_child`]. There is no registry, no string
10//! key, and no lookup performed while running — a mis-wired stack fails to compile.
11
12pub mod child;
13pub mod cx;
14pub mod effect;
15pub mod error;
16pub mod node;
17pub mod protocol;
18pub mod session;
19pub mod store;
20pub mod time;
21
22pub use child::Child;
23pub use cx::{Cx, EffectSink, NoNotes, NoteSink};
24pub use effect::{Effect, TimerId, WriteKind};
25pub use node::NodeId;
26pub use protocol::{
27    Event, ProtoCx, ProtoEffect, ProtoEvent, Protocol, step, step_in, step_noting, step_with,
28};
29pub use session::SessionEvent;
30pub use store::{KeyedSlot, MemStore, NoStore, Position, SeqSlot, Slot, Store};
31pub use time::Time;