20 unstable releases (6 breaking)

new 0.8.1 Nov 25, 2021
0.7.0 Oct 24, 2021
0.6.2 May 5, 2021
0.5.5 Jan 21, 2021
0.3.0 Dec 26, 2020

#40 in HTTP client

Download history 30/week @ 2021-08-16 1/week @ 2021-09-06 5/week @ 2021-09-13 15/week @ 2021-09-27 34/week @ 2021-10-04 26/week @ 2021-10-11 5/week @ 2021-10-18 16/week @ 2021-10-25 16/week @ 2021-11-01 42/week @ 2021-11-08 7/week @ 2021-11-15 25/week @ 2021-11-22

90 downloads per month

MIT/Apache

2.5MB
1K SLoC

Manic

Crates.io Crates.io Tests

Crates.io dependency status

Fast and simple multithread downloads

Provides easy to use functions to download a file using multiple async or threaded connections while taking care to preserve integrity of the file and check it against a checksum.

Feature flags

  • progress: Enables progress reporting using indicatif [enabled by default]
  • json: Enables use of JSON features on the reqwest Client [enabled by default]
  • rustls: Use Rustls for HTTPS [enabled by default]
  • openssl: Use OpenSSL for HTTPS
  • threaded: Enable multithreaded client
  • async: Enable async client [enabled by default]

Crate usage

Examples

Async example

use manic::Downloader;

#[tokio::main]
async fn main() -> Result<(), manic::ManicError> {
	let workers: u8 = 5;
	let client = Downloader::new("https://crates.io", workers).await?;
	let _ = client.download().await?;
	Ok(())
}

Multithread example

use manic::threaded::Downloader;

fn main() -> Result<(), manic::ManicError> {
    let workers: u8 = 5;
    let client = Downloader::new("https://crates.io", workers)?;
    let _ = client.download()?;
    Ok(())
}

License: MIT OR Apache-2.0

Dependencies

~5.5–10MB
~223K SLoC

-a