Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Implementation — ledvar-rs

ledvar-rs is the Rust reference implementation: a small, dependency-light workspace of three crates.

CrateKindWhat it is
ledvar-corelibthe data model, canonical hashing, well-formedness
ledvar-difflibthe optional StateStatus comparison (the DIFF.md companion)
ledvarbinthe CLI: validate, hash, diff, canon, schema

API reference

The library API is documented on docs.rs (generated automatically):

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-rs README; this page is the overview.