9 releases
Uses new Rust 2024
| 0.0.12 | May 8, 2026 |
|---|---|
| 0.0.11 | May 7, 2026 |
#1436 in Web programming
37 downloads per month
Used in 6 crates
185KB
4K
SLoC
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.
plumb-core
Deterministic design-system linter — rule engine and core types.
plumb-core is the foundation of the Plumb
workspace. It defines the Rule trait, the violation model, the
PlumbSnapshot representation, and the config schema. All output is
byte-identical across runs by design.
Crate highlights
- Rule engine — register rules, run them against a snapshot, collect sorted violations.
- Snapshot types —
PlumbSnapshot,SnapshotCtx,ElementNode,ComputedStyles, viewport definitions. - Config —
Configstruct withserde+schemarssupport. - No I/O, no async, no wall-clock — pure functions of
(snapshot, config).
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Dependencies
~3.5–5MB
~100K SLoC