Understand the architecture
Learn the trait model, domain separation, proof structure, tree metadata, and crate boundaries.
Read the docs →MerkleForge is a generic Rust toolkit for constructing Merkle trees, generating compact inclusion proofs, and verifying data integrity without carrying the full dataset.
The official site keeps implementation guidance, real examples, benchmark evidence, and generated Criterion reports in one place.
Learn the trait model, domain separation, proof structure, tree metadata, and crate boundaries.
Read the docs →Construct a tree, swap hash functions, generate proofs, verify them, and serialize proof data.
Open examples →Compare operations, tree sizes, and hash algorithms with direct links to statistical reports.
View benchmarks →Use the foundation alone, add official hash adapters, or pull in the ready-made tree implementation.
Shared traits, proof types, metadata, serialization, and unified errors.
API docs ↗Domain-separated SHA-256, Keccak-256, and BLAKE3 adapters.
API docs ↗Binary Merkle trees today, with sparse and Patricia variants on the roadmap.
API docs ↗Tree behavior is generic over the hash adapter, so changing algorithms is a type-level decision with no runtime dispatch.
use merkle_core::{traits::MerkleTree, types::LeafIndex};
use merkle_variants::BinaryMerkleTree;
use merkleforge_hash::Sha256;
fn main() -> Result<(), merkle_core::error::MerkleError> {
let mut tree = BinaryMerkleTree::<Sha256>::new();
tree.insert(b"alice:100")?;
tree.insert(b"bob:250")?;
let proof = tree.generate_proof(LeafIndex(0))?;
let root = tree.root().expect("tree is not empty");
assert!(BinaryMerkleTree::<Sha256>::verify(
root,
b"alice:100",
&proof,
));
Ok(())
}