10 releases

0.1.9 Oct 12, 2023
0.1.8 Mar 11, 2023
0.1.7 Jun 11, 2022
0.1.6 Jan 7, 2021
0.1.0 Jul 9, 2018

#284 in Cargo plugins

Download history 1/week @ 2023-12-18 7/week @ 2023-12-25 15/week @ 2024-01-08 15/week @ 2024-01-15 8/week @ 2024-01-22 12/week @ 2024-01-29 12/week @ 2024-02-05 31/week @ 2024-02-12 31/week @ 2024-02-19 40/week @ 2024-02-26 15/week @ 2024-03-04 37/week @ 2024-03-11 18/week @ 2024-03-18 20/week @ 2024-03-25

94 downloads per month
Used in cargo-raze

MIT license

25KB
467 lines

cargo clone

A Cargo subcommand to clone a repository from the crates.io index.

Installation

cargo install cargo-clone-crate

Usage

By default it will attempt to guess if the package uses git, Mercurial, or other version control systems.

cargo clone bitflags

If it can't determine which to use, you can force it manually:

cargo clone --method=fossil rs-graph graph.fossil

You can also download the crate file directly from crates.io:

cargo clone --method=crate bitflags

The crate method can also take a version to fetch a specific version:

cargo clone --version=1.0.1 bitflags

If passed a Cargo-style package spec with a version requirement, it will always use the crate method to download directly from crates.io:

cargo clone bitflags:^1.0

The @ style syntax is also supported:

cargo clone regex@1.7.1

Extra arguments are passed to the VCS command:

cargo clone bitflags --depth=1 bf


lib.rs:

A library to create a local clone of a Cargo package.

This fetches the repository for a package as defined in the repository field of a Cargo package. If there is no repository, it can also fetch the .crate file from crates.io.

Dependencies

~6–22MB
~346K SLoC