#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

#426 in Filesystem

Download history 64/week @ 2024-10-14 116/week @ 2024-10-21 149/week @ 2024-10-28 104/week @ 2024-11-04 132/week @ 2024-11-11 147/week @ 2024-11-18 176/week @ 2024-11-25 204/week @ 2024-12-02 78/week @ 2024-12-09 58/week @ 2024-12-16 19/week @ 2024-12-23 101/week @ 2024-12-30 98/week @ 2025-01-06 102/week @ 2025-01-13 101/week @ 2025-01-20 121/week @ 2025-01-27

436 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
~236K SLoC