Skip to main content

Crate plumb_core

Crate plumb_core 

Source
Expand description

§plumb-core

Core types and the deterministic rule engine for Plumb.

This crate is the foundation every other Plumb crate builds on. It defines the public Violation shape, the Rule trait, the Config schema, and the in-memory PlumbSnapshot type that rule engines evaluate.

§Determinism invariants

plumb-core must produce byte-identical output across runs. The crate forbids std::time::SystemTime::now and std::time::Instant::now via clippy::disallowed_methods, never logs to stdout or stderr, and uses deterministic iteration order everywhere (indexmap instead of std::collections::HashMap for any observable output).

See docs/local/prd.md §9 for the full invariant list.

Re-exports§

pub use config::Config;
pub use config::IgnoreRule;
pub use engine::RunReport;
pub use engine::apply_ignores;
pub use engine::run;
pub use engine::run_many;
pub use engine::run_report;
pub use report::Confidence;
pub use report::Fix;
pub use report::FixKind;
pub use report::Rect;
pub use report::RunId;
pub use report::Severity;
pub use report::ViewportKey;
pub use report::Violation;
pub use report::ViolationSink;
pub use rules::Rule;
pub use rules::RuleMetadata;
pub use rules::builtin_rule_metadata;
pub use rules::register_builtin;
pub use snapshot::PlumbSnapshot;
pub use snapshot::SnapshotCtx;
pub use snapshot::TextBox;

Modules§

config
Config schema — the shape of plumb.toml.
engine
The deterministic rule engine.
report
Violation reporting types — the public shape of Plumb’s output.
rules
Rule engine — the Rule trait and the built-in registry.
snapshot
In-memory snapshot of a rendered page at a single viewport.
telemetry
Opt-in telemetry stub.