Expand description
ยงsiwi-download
A high-performance file downloader library built on Tokio and Reqwest, featuring breakpoint continuation, progress tracking, and async download capabilities.
ยงFeatures
- ๐ Async Download: Built on Tokio for high-performance concurrent downloads
- ๐ Progress Tracking: Visual progress bar support with
indicatif - ๐ Resume Support: Breakpoint continuation for interrupted downloads
- ๐ Proxy Support: HTTP/HTTPS proxy support
- ๐ Flexible Storage: Custom output directory and filename support
- ๐ง Builder Pattern: Fluent API for configuration
ยงQuick Start
use siwi_download::download::{Download, DownloadOptions};
use tracing::Level;
use tracing_subscriber::FmtSubscriber;
#[tokio::main]
async fn main() -> siwi_download::error::AnyResult<()> {
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::INFO)
.finish();
tracing::subscriber::set_global_default(subscriber)
.expect("setting default subscriber failed");
let download = Download::new("./downloads");
download.auto_create_storage_path().await?;
let report = download
.download("https://example.com/file.zip", DownloadOptions::default())
.await?;
println!("Download completed: {:?}", report);
Ok(())
}ยงCLI Usage
Install the CLI tool:
cargo install siwi-downloadDownload a file:
siwi-download -u https://example.com/file.zip -o ./downloads -P