tokio-dl-stream-to-disk

A micro-library for downloading from a URL and streaming it directly to the disk

6 releases (2 stable)

1.0.1 Mar 29, 2024
1.0.0 Dec 21, 2022
0.3.0 Nov 16, 2021
0.2.1 Sep 22, 2021
0.1.0 Aug 17, 2021
Download history 69/week @ 2024-06-16 67/week @ 2024-06-23 54/week @ 2024-06-30 53/week @ 2024-07-07 45/week @ 2024-07-14 26/week @ 2024-07-21 76/week @ 2024-07-28 39/week @ 2024-08-04 73/week @ 2024-08-11 56/week @ 2024-08-18 90/week @ 2024-08-25 85/week @ 2024-09-01 83/week @ 2024-09-08 98/week @ 2024-09-15 116/week @ 2024-09-22 99/week @ 2024-09-29

403 downloads per month
Used in 4 crates

MIT license

13KB
203 lines

tokio-dl-stream-to-disk

crates.io Documentation MIT licensed CI

A micro-library for downloading from a URL and streaming it directly to the disk

Getting Started

use std::path::Path;
use tokio_dl_stream_to_disk::AsyncDownload;

#[tokio::main]
async fn main() {
    if AsyncDownload::new("https://bit.ly/3yWXSOW", &Path::new("/tmp"), "5mb_test.bin").download(&None).await.is_ok() {
        println!("File downloaded successfully!");
    }
}

License: MIT

Dependencies

~6–16MB
~220K SLoC