| Crates.io | trauma |
| lib.rs | trauma |
| version | 2.3.0 |
| created_at | 2022-03-29 15:44:58.805122+00 |
| updated_at | 2025-06-14 12:26:37.555584+00 |
| description | Simplify and prettify HTTP downloads |
| homepage | https://github.com/rgreinho/trauma |
| repository | https://github.com/rgreinho/trauma |
| max_upload_size | |
| id | 558583 |
| size | 404,082 |
Tokio Rust Asynchronous Universal download MAnager
Trauma is a library simplifying and prettifying HTTP(s) downloads. The downloads are executed asynchronously and progress bars are drawn on the screen to help monitoring the process.

Add this to your Cargo.toml:
[dependencies]
trauma = "2"
# or `trauma = { version = "2", default-features = false, features = ["rustls"] }` if you prefer rustls
use std::path::PathBuf;
use trauma::{download::Download, downloader::DownloaderBuilder, Error};
#[tokio::main]
async fn main() -> Result<(), Error> {
let reqwest_rs = "https://github.com/seanmonstar/reqwest/archive/refs/tags/v0.11.9.zip";
let downloads = vec![Download::try_from(reqwest_rs).unwrap()];
let downloader = DownloaderBuilder::new()
.directory(PathBuf::from("output"))
.build();
downloader.download(&downloads).await;
Ok(())
}
More examples can be found in the examples folder. They are well commented and will guide you through the different features of this library.
Before starting this project, I spent some time searching the internet, trying not to reinvent the wheel. And I did find a bunch of interesting existing projects!
However they are almost all abandoned:
As a result, I decided to write trauma.