#download #tokio #streaming #disk #url #stream #async-download

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

#347 in Filesystem

Download history 26/week @ 2024-07-20 76/week @ 2024-07-27 42/week @ 2024-08-03 62/week @ 2024-08-10 62/week @ 2024-08-17 83/week @ 2024-08-24 90/week @ 2024-08-31 84/week @ 2024-09-07 100/week @ 2024-09-14 109/week @ 2024-09-21 82/week @ 2024-09-28 86/week @ 2024-10-05 103/week @ 2024-10-12 83/week @ 2024-10-19 154/week @ 2024-10-26 125/week @ 2024-11-02

485 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

~7–18MB
~235K SLoC