#download #recursion #cargo #collect #version #tool

app cargo-collect

Cargo tool for download crate file and its dependencies recursively

3 releases

new 0.1.2 Oct 17, 2024
0.1.1 Mar 26, 2023
0.1.0 Mar 26, 2023

#265 in Cargo plugins

Download history 5/week @ 2024-09-23 156/week @ 2024-10-14

161 downloads per month

GPL-3.0 license

30KB
311 lines

cargo-collect

A Cargo subcommand for recursive download of crates and thier dependencies from crates.io.

Description

cargo-collect can be used to download a gzipped archive of given crate, in the exact form that it was uploaded to crates.io.

This can be useful for a variety of things, such as:

  • download the crates to upload to third party registry with cargo-upload.
  • security auditing of crates (esp. when a crate repository is missing).
  • reproducing a bug that only occurs in uploaded versions of your crate.

Installation

cargo-collect can be installed with cargo install

$ cargo install cargo-collect

This shall put the cargo-collect executable in your Cargo binary directory (e.g. ~/.cargo/bin), which hopefully is in your $PATH.

Usage

To download the newest version of foo crate and its dependencies, do this:

$ cargo collect foo --output /path/to/optput/folder

For more detailed usage instructions, run cargo collect --help.

License

cargo-collect is licensed under the terms of the GNU GENERAL PUBLIC LICENSE Version 3

Dependencies

~23–37MB
~637K SLoC