vflight 0.9.2

Share files over the Veilid distributed network with content-addressable storage
Documentation
#![recursion_limit = "512"]

//! # vflight
//!
//! Share files over the Veilid distributed network with content-addressable storage.
//!
//! ## Overview
//!
//! `vflight` enables secure, decentralized file sharing using the Veilid p2p network.
//! Files are chunked into 30KB pieces, hashed with BLAKE3, and stored in Veilid's DHT.
//!
//! ## Quick Example
//!
//! ```no_run
//! use vflight::chunker::chunk_file;
//! use std::path::Path;
//!
//! # async fn example() -> anyhow::Result<()> {
//! let chunks = chunk_file(Path::new("myfile.bin"))?;
//! for chunk in chunks {
//!     println!("Chunk {}: {} bytes", chunk.index, chunk.data.len());
//! }
//! # Ok(())
//! # }
//! ```
//!
//! ## Key Modules
//!
//! - [`chunker`] - File splitting and reassembly with hashing
//! - [`compression`] - Zstd compression before chunking
//! - [`protocol`] - Network message definitions
//! - [`node`] - Veilid node lifecycle management
//! - [`seed`] - Seed files to the network
//! - [`fetch`] - Retrieve files from the network
//! - [`metrics`] - Performance metrics collection
//! - [`encryption`] - Chunk encryption for secure transfers
//! - [`resume`] - Resume state management for interrupted downloads
//! - [`throttle`] - Token-bucket bandwidth throttling for transfers

pub mod chunker;
pub mod compression;
pub mod encryption;
pub mod fetch;
pub mod metrics;
pub mod node;
pub mod protocol;
pub mod resume;
pub mod seed;
pub mod throttle;

// Re-export commonly used types
pub use chunker::{chunk_data, chunk_file, reassemble_chunks, Chunk};
pub use compression::{compress, decompress};
pub use encryption::{generate_salt, EncryptionContext, SALT_LEN, SESSION_NONCE_LEN};
pub use node::{start_node, stop_node, wait_for_attach};
pub use protocol::{FileMetadata, Request, Response, CHUNK_SIZE};
pub use resume::{ResumeManager, ResumeMetadata, ResumeState};
pub use throttle::Throttler;