#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

#392 in HTTP client

Download history 485/week @ 2024-07-20 464/week @ 2024-07-27 405/week @ 2024-08-03 541/week @ 2024-08-10 511/week @ 2024-08-17 536/week @ 2024-08-24 633/week @ 2024-08-31 491/week @ 2024-09-07 474/week @ 2024-09-14 648/week @ 2024-09-21 489/week @ 2024-09-28 186/week @ 2024-10-05 376/week @ 2024-10-12 384/week @ 2024-10-19 456/week @ 2024-10-26 484/week @ 2024-11-02

1,714 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

~5–14MB
~191K SLoC