bytehaul
A Rust async HTTP download library with resume, multi-connection, write-back cache, rate limiting, and checksum verification.
Documentation
Features
- Single & multi-connection downloads — automatic Range probing and fallback
- Resume / breakpoint continuation — control file persistence with atomic save
- Write-back cache — piece-based aggregation to reduce random I/O
- Memory budget & backpressure — semaphore-based flow control
- Retry with exponential backoff — configurable max retries, respects
Retry-After - Rate limiting — shared token-bucket across all workers
- SHA-256 checksum verification — post-download integrity check
- Cancellation — cooperative cancel via watch channel
- Progress reporting — real-time speed, downloaded bytes, state
- Shared network configuration — proxy, custom DNS servers, and IPv6 toggle on the downloader client
Installation
Rust
Add bytehaul to your project via Cargo:
Or add it manually to your Cargo.toml:
[]
= "0.1.2"
Python
Requires Python 3.9+. A single wheel per platform covers all supported Python versions (abi3).
Quick Start (Rust)
use ;
async
For configuration, progress monitoring, cancellation, and more, see the Advanced Usage Guide.
Quick Start (Python)
# Simple one-line download
# With options
For the full Python API (object API, progress, cancellation, error handling, etc.), see the Python Bindings Guide.
Architecture
DownloadManager
└─ DownloadSession
├─ Scheduler (piece assignment, segment reclamation)
├─ HttpWorker ×N (Range requests, retry)
│ └─ channel ─→ Writer (WriteBackCache → FileWriter)
└─ ControlStore (atomic save/load/delete)
License
MIT. See LICENSE.