persistant_core/lib.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! PersistAnt's vocabulary and verification model. No I/O, no third-party dependencies.
3//!
4//! A **capability** is a boolean for one `(backend, version, config)`; it is off until an automated
5//! test passed (`docs/DESIGN-KINDS.md` §2.1). This crate holds the pieces every kind shares:
6//!
7//! - [`CapabilityId`]: a validated string id, owned here, never changing meaning;
8//! - [`Config`]: the `k=v;k=v` facts a gate can read at open;
9//! - [`Row`] and [`Matrix`]: the recorded fact (§2.4) and the lookup the gate performs;
10//! - [`Verdict`]: the four test outcomes, and the rule that an `on` row needs both controls;
11//! - [`vocabulary::SEED`]: the seed ids with their written contracts (all off until tested).
12
13pub mod bench;
14pub mod choose;
15mod config;
16mod id;
17mod matrix;
18mod row;
19mod verdict;
20pub mod vocabulary;
21
22pub use config::{Config, ConfigError};
23pub use id::{CapabilityId, IdError};
24pub use matrix::{Lookup, Matrix};
25pub use row::{ParseError, Reason, Row};
26pub use verdict::{Controls, ControlsNotRun, Verdict};
27
28/// The crate version, as declared in the workspace manifest.
29pub const VERSION: &str = env!("CARGO_PKG_VERSION");