#download #toml #assets #test-assets

dev bin+lib test-assets-ureq

Download test assets with ureq, managing them outside of git

2 unstable releases

0.6.0 Dec 22, 2025
0.5.0 Jan 20, 2025
0.4.0 Jan 20, 2025
0.3.0 Nov 9, 2024

#301 in Testing

Download history 570/week @ 2025-11-17 607/week @ 2025-11-24 606/week @ 2025-12-01 466/week @ 2025-12-08 709/week @ 2025-12-15 629/week @ 2025-12-22 812/week @ 2025-12-29 391/week @ 2026-01-05 745/week @ 2026-01-12 353/week @ 2026-01-19 361/week @ 2026-01-26 550/week @ 2026-02-02 1418/week @ 2026-02-09 371/week @ 2026-02-16 733/week @ 2026-02-23 1020/week @ 2026-03-02

3,583 downloads per month
Used in 5 crates

MIT/Apache

28KB
542 lines

Test Assets

github crates.io docs.rs build status

Download test assets, managing them outside of git.

Changes from being a fork of test-assets:

  • Use of rust library ureq and avoid compiling curl for test binaries
  • backoff support
  • Multi-threaded downloading
  • Library and Binary usage of a .toml asset definition file
  • Download binary dl

Library

Compiler support: requires rustc 1.82+

Add the following to your Cargo.toml file:

[dependencies]
test-assets-ureq = "0.6.0"

For example, add the following information into the project toml file.

[test_assets.test_00]
filepath = "out.squashfs"
hash = "976c1638d8c1ba8014de6c64b196cbd70a5acf031be10a8e7f649536193c8e78"
url = "https://wcampbell.dev/squashfs/testing/test_00/out.squashfs"

In your rust code, add the following to download using that previous file.

let file_content = fs::read_to_string("test.toml").unwrap();
let parsed: TestAsset = toml::de::from_str(&file_content).unwrap();
let assets = parsed.values();
dl_test_files_backoff(&assets, "test-assets", true, Duration::from_secs(1)).unwrap();

Binary

If test-assets are needed outside of the Rust code, a binary is provided to download them. See the latest release.

Usage: dl [OPTIONS] <FILE> <PATH>

Arguments:
  <FILE>  Path to the TOML file to read
  <PATH>  Base path to write downloaded files

Options:
      --assets <ASSETS>  List of specific asset names to download (downloads all if not specified)
  -h, --help             Print help

Dependencies

~9–21MB
~245K SLoC