ferripfs-blockstore 0.1.0

Content-addressed block storage for IPFS, compatible with Kubo
Documentation

ferripfs-blockstore

Content-addressed block storage for IPFS, compatible with Kubo.

Note: This crate is part of ferripfs, a Rust port of Kubo (the Go IPFS implementation). The implementation follows Kubo's boxo/blockstore package.

Features

  • Block Storage: Store and retrieve data blocks by CID
  • CID Utilities: Create and parse CIDv0/CIDv1 content identifiers
  • FlatFS Backend: File-based storage with sharding
  • Caching Layer: LRU cache for frequently accessed blocks
  • Garbage Collection: Remove unreferenced blocks

Usage

use ferripfs_blockstore::{FlatFsBlockstore, Blockstore, create_cid_v1};

// Create a blockstore
let store = FlatFsBlockstore::new("/path/to/blocks")?;

// Store a block
let data = b"Hello, IPFS!";
let cid = create_cid_v1(data)?;
store.put(&cid, data.to_vec())?;

// Retrieve a block
let retrieved = store.get(&cid)?;

License

Dual-licensed under MIT and Apache-2.0.