Implementation — ledvar-rs
ledvar-rs is the Rust reference implementation: a small,
dependency-light workspace of three crates.
| Crate | Kind | What it is |
|---|---|---|
ledvar-core | lib | the data model, canonical hashing, well-formedness |
ledvar-diff | lib | the optional StateStatus comparison (the DIFF.md companion) |
ledvar | bin | the CLI: validate, hash, diff, canon, schema |
API reference
The library API is documented on docs.rs (generated automatically):
docs.rs/ledvar-core— the model + hashingdocs.rs/ledvar-diff— the comparison
CLI at a glance
ledvar validate snapshot-a.json # check it is well-formed
ledvar hash snapshot-a.json # each node's identity_key + content_hash
ledvar diff snapshot-a.json snapshot-b.json # what changed between two snapshots
ledvar canon snapshot-a.json # the exact bytes fed to SHA-256
ledvar schema --out json # the reference schema
Input and output formats are independent axes (--in / --out). JSON is always available; YAML is
opt-in behind a build feature.
New to the CLI? The Getting started page runs every one of these against real example snapshots, with the output shown.
Any language is welcome
The reference implementation is Rust, but the protocol is language-agnostic. Bring it to your language — hash a node the same way, byte for byte, and prove it against the conformance vectors.
The full install and usage docs live in the
ledvar-rsREADME; this page is the overview.