#download #streaming #disk #tokio #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

#296 in Filesystem

Download history 9/week @ 2024-01-20 22/week @ 2024-01-27 50/week @ 2024-02-03 38/week @ 2024-02-10 61/week @ 2024-02-17 114/week @ 2024-02-24 80/week @ 2024-03-02 82/week @ 2024-03-09 70/week @ 2024-03-16 185/week @ 2024-03-23 214/week @ 2024-03-30 114/week @ 2024-04-06 65/week @ 2024-04-13 103/week @ 2024-04-20 119/week @ 2024-04-27 76/week @ 2024-05-04

375 downloads per month
Used in 5 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–20MB
~261K SLoC