| Crates.io | oxdl |
| lib.rs | oxdl |
| version | 0.1.5 |
| created_at | 2025-12-06 00:03:14.809575+00 |
| updated_at | 2025-12-13 19:13:05.953087+00 |
| description | Asynchronous downloader with progress bars and SHA256 verification. |
| homepage | https://github.com/iiTONELOC/0xDL |
| repository | https://github.com/iiTONELOC/0xDL |
| max_upload_size | |
| id | 1969429 |
| size | 72,202 |
A Rust library for fast, reliable asynchronous file downloading.

0xDL provides a clean, minimal abstraction for downloading large files over HTTP/S using asynchronous Rust.
Built on Tokio and reqwest, it offers:
Install 0xDL using Cargo:
cargo add oxdl
Or add it manually to Cargo.toml:
[dependencies]
oxdl = "0.1.5"
Fn(f32) progress callbacks
0xDL exposes two high‑level functions.
download(url, path, sha256) — simple downloaduse oxdl::download;
#[tokio::main]
async fn main() -> Result<(), oxdl::DownloadError> {
let url = "https://example.com/file.iso";
let path = "file.iso";
download(url, path, None).await?;
Ok(())
}
download_with_updates(url, path, progress_callback, sha256)use oxdl::download_with_updates;
#[tokio::main]
async fn main() -> Result<(), oxdl::DownloadError> {
let url = "https://example.com/file.iso";
let path = "file.iso";
let progress = |pct: f32| println!("Progress: {:.1}%", pct);
download_with_updates(url, path, Some(Box::new(progress)), None).await?;
Ok(())
}
| Function | Progress | SHA‑256 | Use Case |
|---|---|---|---|
download |
❌ | ✔ optional | Simple fire‑and‑forget download |
download_with_updates |
✔ optional | ✔ optional | UI/CLI progress + integrity checks |
If SHA‑256 validation fails, 0xDL automatically deletes the temporary file.
Advanced users may construct a downloader manually.
use oxdl::Downloader;
let dl = Downloader::new("https://example.com/file.iso", "file.iso")?
.on_update(|p| println!("{p:.1}%"))
.with_sha256("deadbeef...")?;
dl.execute().await?;
| Method | Description |
|---|---|
new(url, path) |
Validates and constructs a downloader |
on_update(f) |
Sets a callback receiving progress 0–100% |
with_sha256(hex) |
Enables SHA‑256 verification |
execute() |
Performs the full download |
0xDL organizes tests using features so expensive tests only run when requested.
| Feature | Includes |
|---|---|
tests |
Offline unit tests |
net-tests |
Real HTTP downloads |
dl-iso-test |
Large (>1GB) ISO stress test |
all-tests |
tests + net-tests |
all-tests-w-iso-dl |
everything including large ISO test |
cargo test --features tests
cargo test --features net-tests
cargo test --features all-tests
cargo test --features all-tests-w-iso-dl -- --nocapture
cargo test --features dl-iso-test -- --nocapture
MIT
PRs welcome.
Created by Anthony Tropeano — https://github.com/iitoneloc