#cargo #clone #fossil

bin+lib cargo-clone-crate

Cargo subcommand to clone a repo from the registry

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

#248 in Cargo plugins

Download history 65/week @ 2023-10-29 44/week @ 2023-11-05 48/week @ 2023-11-12 40/week @ 2023-11-19 116/week @ 2023-11-26 42/week @ 2023-12-03 32/week @ 2023-12-10 20/week @ 2023-12-17 53/week @ 2023-12-24 30/week @ 2023-12-31 44/week @ 2024-01-07 41/week @ 2024-01-14 50/week @ 2024-01-21 76/week @ 2024-01-28 49/week @ 2024-02-04 87/week @ 2024-02-11

265 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–23MB
~351K SLoC