20 unstable releases (6 breaking)

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

#359 in HTTP client

Download history 2/week @ 2024-01-26 16/week @ 2024-02-02 4/week @ 2024-02-16 9/week @ 2024-02-23 8/week @ 2024-03-01 12/week @ 2024-03-08 4/week @ 2024-03-15 1/week @ 2024-03-22 152/week @ 2024-03-29

170 downloads per month

MIT/Apache

2.5MB
1K SLoC

Contains (Zip file, 2.5MB) tests/static/croc.zip

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

~7–21MB
~328K SLoC