determa_state/lib.rs
1//! Determa State — a Rust implementation of the Determa State statechart engine.
2//!
3//! Implements Determa State spec **v0.0.5**. Correctness is defined by the language-agnostic
4//! conformance suite at <https://github.com/fruwehq/determa-state-conformance> (pinned at
5//! tag `v0.0.5`). See `SPEC.md` in the spec repository for the normative text.
6//!
7//! This crate exposes an embeddable library API (SPEC §2) and a standard `determa-state` //! CLI (`src/bin/determa_state.rs`, SPEC §13).
8//!
9//! # Example
10//! ```
11//! use determa_state::{build_machine, load_machines};
12//! let docs = load_machines(include_str!("../examples/minimal.yaml"))
13//! .expect("minimal.yaml parses");
14//! let (valid, _errs) = determa_state::validate(&docs, &[]);
15//! assert!(valid);
16//! let _machine = build_machine(&docs[0]).expect("builds");
17//! ```
18
19pub mod cel;
20pub mod cli;
21pub mod export;
22pub mod loader;
23pub mod machine;
24pub mod model;
25pub mod runtime;
26pub mod store;
27pub mod validate;
28pub mod value;
29
30pub use loader::{load_contract, load_machines, LoadError};
31pub use validate::{validate, Contract};
32
33pub use machine::{build as build_machine, resolve_definitions, Machine, NodeId, Scope};
34pub use runtime::{Engine, Mode, RunResult, Snapshot, Status, StepRecord};
35pub use value::Value;