#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

#395 in HTTP client

Download history 467/week @ 2024-07-22 439/week @ 2024-07-29 432/week @ 2024-08-05 551/week @ 2024-08-12 489/week @ 2024-08-19 644/week @ 2024-08-26 565/week @ 2024-09-02 460/week @ 2024-09-09 542/week @ 2024-09-16 599/week @ 2024-09-23 465/week @ 2024-09-30 90/week @ 2024-10-07 410/week @ 2024-10-14 404/week @ 2024-10-21 508/week @ 2024-10-28 396/week @ 2024-11-04

1,736 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
~193K SLoC