#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

#278 in Filesystem

Download history 17/week @ 2023-12-21 5/week @ 2023-12-28 34/week @ 2024-01-04 44/week @ 2024-01-11 15/week @ 2024-01-18 17/week @ 2024-01-25 45/week @ 2024-02-01 38/week @ 2024-02-08 41/week @ 2024-02-15 113/week @ 2024-02-22 87/week @ 2024-02-29 68/week @ 2024-03-07 95/week @ 2024-03-14 58/week @ 2024-03-21 270/week @ 2024-03-28 133/week @ 2024-04-04

565 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–19MB
~261K SLoC