#tar #fetch #http #gzip #unroll

fetch_unroll

Simple utilities for fetching and unrolling .tar.gz archives

5 unstable releases

0.3.0 Jan 7, 2021
0.2.2 Dec 16, 2020
0.2.1 Feb 7, 2020
0.2.0 Feb 6, 2020
0.1.0 Jan 7, 2020

#331 in HTTP client

Download history 425/week @ 2023-12-11 482/week @ 2023-12-18 291/week @ 2023-12-25 195/week @ 2024-01-01 414/week @ 2024-01-08 430/week @ 2024-01-15 434/week @ 2024-01-22 253/week @ 2024-01-29 406/week @ 2024-02-05 463/week @ 2024-02-12 612/week @ 2024-02-19 617/week @ 2024-02-26 511/week @ 2024-03-04 485/week @ 2024-03-11 599/week @ 2024-03-18 605/week @ 2024-03-25

2,267 downloads per month
Used in 5 crates (4 directly)

Apache-2.0

19KB
395 lines

Simple fetch and unroll .tar.gz archives

License: Apache-2.0 Crates.io Package Docs.rs API Docs Travis-CI Status

Simple functions intended to use in Rust build.rs scripts for tasks which related to fetching from HTTP and unrolling .tar.gz archives with precompiled binaries and etc.

Usage example

use fetch_unroll::Fetch;

let pack_url = format!(
    concat!("{base}/{user}/{repo}/releases/download/",
            "{package}-{version}/{package}_{target}_{profile}.tar.gz"),
    base = "https://github.com",
    user = "katyo",
    repo = "aubio-rs",
    package = "libaubio",
    version = "0.5.0-alpha",
    target = "armv7-linux-androideabi",
    profile = "debug",
);

let dest_dir = "target/test_download";

// Fetching and unrolling archive
Fetch::from(pack_url)
    .unroll().strip_components(1).to(dest_dir)
    .unwrap();

Dependencies

~4–14MB
~195K SLoC