| Crates.io | turbo-cdn |
| lib.rs | turbo-cdn |
| version | 0.8.1 |
| created_at | 2025-06-20 13:47:53.727698+00 |
| updated_at | 2026-01-10 14:22:17.295733+00 |
| description | Intelligent download accelerator with automatic CDN optimization and concurrent chunked downloads |
| homepage | https://github.com/loonghao/turbo-cdn |
| repository | https://github.com/loonghao/turbo-cdn |
| max_upload_size | |
| id | 1719666 |
| size | 830,457 |
δΈζζζ‘£ | English | π Documentation
Next-generation intelligent download accelerator with automatic geographic detection, real-time CDN quality assessment, and comprehensive mirror optimization for 6+ package managers.
π Intelligent Geographic Detection - Auto-region detection with multiple API fallbacks
π Real-time CDN Quality Assessment - Continuous monitoring with dynamic ranking
β‘ High-Performance Architecture - mimalloc, reqwest + rustls, adaptive concurrency
π Multi-CDN Mirror Coverage - GitHub, PyPI, Crates.io, npm, Docker Hub, Maven, and more
π§ Smart Download Mode - Automatic method selection based on performance testing
π Resume Support - Robust resume capability for interrupted downloads
π Read the full documentation for detailed guides and API reference.
# From crates.io
cargo install turbo-cdn
# Or from source
git clone https://github.com/loonghao/turbo-cdn.git
cd turbo-cdn
cargo build --release
# Smart download (default - auto-selects best method)
turbo-cdn dl "https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-pc-windows-msvc.zip"
# Get optimized CDN URL
turbo-cdn optimize "https://github.com/user/repo/releases/download/v1.0/file.zip"
# Download with verbose output
turbo-cdn dl "https://example.com/file.zip" --verbose
# View performance statistics
turbo-cdn stats
Optional self-update command: enable during install with cargo install turbo-cdn --features self-update to use turbo-cdn self-update / turbo-cdn upgrade.
Stats command status: currently prints a readiness summary; detailed metrics will ship in upcoming releases.
use turbo_cdn::*;
#[tokio::main]
async fn main() -> turbo_cdn::Result<()> {
let downloader = TurboCdn::new().await?;
let result = downloader.download_from_url(
"https://github.com/user/repo/releases/download/v1.0/file.zip"
).await?;
println!("Downloaded {} bytes at {:.2} MB/s",
result.size, result.speed / 1024.0 / 1024.0);
Ok(())
}
[dependencies]
# Library-friendly defaults (self-update off, rustls ring backend - no cmake/NASM needed)
turbo-cdn = { version = "0.8", features = ["rustls", "fast-hash", "high-performance"] }
# CLI build with self-update enabled
turbo-cdn = { version = "0.8", default-features = false, features = ["rustls", "fast-hash", "high-performance", "self-update"] }
# Windows-friendly native TLS (SChannel) if you prefer not to use rustls
turbo-cdn = { version = "0.8", default-features = false, features = ["native-tls", "fast-hash", "high-performance"] }
| Feature | Default | Description |
|---|---|---|
rustls |
Yes | TLS via rustls (ring backend, no cmake/NASM toolchain required) |
native-tls |
No | Use native TLS (SChannel/Secure Transport) instead of rustls |
fast-hash |
Yes | Use ahash for faster hashing |
high-performance |
Yes | Enable high-performance optimizations |
self-update |
No | CLI self-update functionality (opt-in for binaries) |
| Package Manager | Mirrors | Regions |
|---|---|---|
| GitHub | 7 mirrors | China, Asia, Global |
| Microsoft Visual Studio downloads | Direct + configurable mirrors | Global |
| Python PyPI | Tsinghua, Aliyun, Douban | China |
| Rust Crates | Tsinghua, USTC | China |
| Go Modules | goproxy.cn, Aliyun | China |
| Docker Hub | USTC, NetEase, Docker China | China |
| Maven Central | Aliyun, Tsinghua | China |
| jsDelivr | 5 global CDN nodes | Global |
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Input URL βββββΆβ Geographic βββββΆβ CDN Quality β
β β β Detection β β Assessment β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β URL Mapper β β Smart Download β β Adaptive β
β (16+ Rules) β β Selection β β Concurrency β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
We welcome contributions! Please see our Contributing Guide for details.
# Development setup
git clone https://github.com/loonghao/turbo-cdn.git
cd turbo-cdn
cargo build
cargo test
cargo clippy
This project is licensed under the MIT License - see the LICENSE file for details.