#storage-back-end #sedimentree

sedimentree_fs_storage

Filesystem-based storage backend for Sedimentree

9 releases (5 breaking)

Uses new Rust 2024

new 0.8.0 Apr 7, 2026
0.7.2 Mar 30, 2026
0.6.0 Mar 15, 2026
0.5.0 Mar 1, 2026
0.3.0 Feb 2, 2026

#650 in Filesystem

Download history 11/week @ 2026-02-18 71/week @ 2026-02-25 34/week @ 2026-03-04 49/week @ 2026-03-11 31/week @ 2026-03-25

114 downloads per month
Used in 3 crates

MIT/Apache

1MB
18K SLoC

sedimentree_fs

Filesystem-based storage backend for Sedimentree.

Overview

This crate provides FsStorage, a content-addressed filesystem storage implementation that implements the Storage trait from subduction_core.

Storage Layout

root/
├── trees/
│   └── {sedimentree_id_hex}/
│       ├── commits/
│       │   └── {digest_hex}.cbor  ← Signed<LooseCommit>
│       └── fragments/
│           └── {digest_hex}.cbor  ← Signed<Fragment>
└── blobs/
    └── {digest_hex}               ← raw bytes

Usage

use sedimentree_fs::FsStorage;
use std::path::PathBuf;

let storage = FsStorage::new(PathBuf::from("./data"))?;

Features

  • Content-addressed storage (files named by BLAKE3 digest)
  • Atomic writes (write to .tmp, then rename)
  • CBOR encoding for commits/fragments via minicbor
  • Blobs stored as raw bytes
  • In-memory cache of SedimentreeIds for fast lookup
  • Implements both Storage<Sendable> and Storage<Local> traits

License

MIT OR Apache-2.0

Dependencies

~14–21MB
~302K SLoC