5 releases
| new 0.2.6 | Feb 9, 2026 |
|---|---|
| 0.2.5 | Feb 2, 2026 |
| 0.2.4 | Jan 31, 2026 |
| 0.2.3 | Jan 19, 2026 |
| 0.2.1 | Dec 27, 2025 |
#958 in Filesystem
Used in 2 crates
280KB
6.5K
SLoC
Filesystem-based content-addressed blob storage.
Stores blobs in a directory structure similar to git:
{base_path}/{first 2 chars of hash}/{remaining hash chars}
For example, a blob with hash abcdef123... would be stored at:
~/.hashtree/blobs/ab/cdef123...
hashtree-fs
Filesystem-based content-addressed blob storage for hashtree.
Simple storage backend that stores blobs as files on disk, organized by hash prefix for efficient lookup.
Usage
use hashtree_fs::FsStore;
use hashtree_core::Store;
let store = FsStore::new("/path/to/data")?;
// Store a blob
store.put(&hash, &data)?;
// Retrieve a blob
let data = store.get(&hash)?;
Storage Layout
Blobs are stored in a directory structure based on hash prefix:
data/
ab/
abcd1234...
cd/
cdef5678...
Part of hashtree-rs.
Dependencies
~3.5–5MB
~94K SLoC