iroh_blobs/lib.rs
1#![doc = include_str!("../README.md")]
2//! # Module docs
3//!
4//! The crate is designed to be used from the [iroh] crate.
5//!
6//! It implements a [protocol] for streaming content-addressed data transfer using
7//! [BLAKE3] verified streaming.
8//!
9//! It also provides a [store] module for storage of blobs and outboards,
10//! as well as a [persistent](crate::store::fs) and a [memory](crate::store::mem)
11//! store implementation.
12//!
13//! To implement a server, the [provider] module provides helpers for handling
14//! connections and individual requests given a store.
15//!
16//! To perform get requests, the [get] module provides utilities to perform
17//! requests and store the result in a store, as well as a low level state
18//! machine for executing requests.
19//!
20//! The client API is available in the [api] module. You can get a client
21//! either from one of the [store] implementations, or from the [BlobsProtocol]
22//! via a
23//!
24//! The [downloader](api::downloader) module provides a component to download blobs from
25//! multiple sources and store them in a store.
26//!
27//! [BLAKE3]: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf
28//! [iroh]: https://docs.rs/iroh
29mod hash;
30pub mod store;
31pub use hash::{BlobFormat, Hash, HashAndFormat};
32pub mod api;
33
34pub mod format;
35pub mod get;
36pub mod hashseq;
37mod metrics;
38mod net_protocol;
39pub use net_protocol::BlobsProtocol;
40pub mod protocol;
41pub mod provider;
42pub mod ticket;
43
44#[doc(hidden)]
45pub mod test;
46mod util;
47
48#[cfg(test)]
49mod tests;
50
51pub use protocol::ALPN;