All Projects → JanLikar → cargo-clone

JanLikar / cargo-clone

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
A cargo subcommand to fetch the source code of a Rust crate

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to cargo-clone

cargo-release
Cargo subcommand `release`: everything about releasing a rust crate.
Stars: ✭ 854 (+1086.11%)
Mutual labels:  cargo, cargo-subcommand
cargo-supply-chain
Gather author, contributor and publisher data on crates in your dependency graph.
Stars: ✭ 287 (+298.61%)
Mutual labels:  cargo, cargo-subcommand
cargo-valgrind
A cargo subcommand, that runs valgrind and displays its output in a helpful manner.
Stars: ✭ 66 (-8.33%)
Mutual labels:  cargo, cargo-subcommand
cargo-cook
A rust cargo subcommand which cooks your crate
Stars: ✭ 29 (-59.72%)
Mutual labels:  cargo, cargo-subcommand
cargo-wix
A cargo subcommand to build Windows installers for rust projects using the WiX Toolset
Stars: ✭ 142 (+97.22%)
Mutual labels:  cargo, cargo-subcommand
cargo-aur
Prepare Rust projects to be released on the Arch Linux User Repository
Stars: ✭ 49 (-31.94%)
Mutual labels:  cargo, cargo-subcommand
domain-lookup-tree
A tree structure in Rust optimized for looking up domain names, with wildcard support
Stars: ✭ 17 (-76.39%)
Mutual labels:  rust-crate
RustLabs
The Ultimate Workshop Track for #Rust Developer
Stars: ✭ 22 (-69.44%)
Mutual labels:  cargo
crates-io-cn
Source code of crates-io.cn, also tools sets for sync crates.io
Stars: ✭ 20 (-72.22%)
Mutual labels:  rust-crate
simdutf8
SIMD-accelerated UTF-8 validation for Rust.
Stars: ✭ 426 (+491.67%)
Mutual labels:  rust-crate
build-rust
Script helper for building rustc and cargo from source on OpenBSD (without rustup)
Stars: ✭ 33 (-54.17%)
Mutual labels:  cargo
cargo-deny-action
❌ GitHub Action for cargo-deny 🦀
Stars: ✭ 45 (-37.5%)
Mutual labels:  cargo
newport
Modular game engine built in Rust
Stars: ✭ 4 (-94.44%)
Mutual labels:  rust-crate
nix-template
Make creating nix expressions easy
Stars: ✭ 161 (+123.61%)
Mutual labels:  cargo
tiny-secp256k1
A tiny secp256k1 native/JS wrapper
Stars: ✭ 41 (-43.06%)
Mutual labels:  rust-crate
cargo-disassemble
Disassemble your Rust project with Cargo
Stars: ✭ 21 (-70.83%)
Mutual labels:  cargo-subcommand
cargo-esr
Extended Search & Ranking tool for crates.
Stars: ✭ 23 (-68.06%)
Mutual labels:  cargo
cargo-msrv
🦀 Find the minimum supported Rust version (MSRV) for your project
Stars: ✭ 247 (+243.06%)
Mutual labels:  cargo
Curio
A Blazing Fast HTTP Client
Stars: ✭ 35 (-51.39%)
Mutual labels:  rust-crate
www
my website built using Rust (stdweb) → .wasm (also: dat://ricky.codes)
Stars: ✭ 12 (-83.33%)
Mutual labels:  cargo

cargo-clone

cargo-clone can be used to fetch the source code of a Rust crate from a registry.

cargo clone [FLAGS] [OPTIONS] <crate>... [-- <directory>]

cargo-clone is a Cargo subcommand.

Installation & upgrading

cargo install cargo-clone

Usage

cargo clone [FLAGS] [OPTIONS] <crate>... [-- <directory>]

To download cargo-clone's code you would use

cargo clone cargo-clone

Specifying versions

The latest available version is downloaded by default. If specific versions are desired, semver specifiers can be appended to crate names.

cargo clone [email protected]

Versions are matched exactly by default, but other kinds of matching are also allowed.

cargo clone cargo-clone@~1.0.0

Cloning from git repositories

Using the --git flag runs git clone on each git repository url extracted from crate's metadata.

These lines are roughly equivalent:

cargo clone --git cargo-clone
git clone https://github.com/janlikar/cargo-clone

The command fails if a crate does not have the repository field set to a valid git repository.

Output directory

Crates are downloaded into $PWD/$CRATE_NAME by default.

The output dir can be specified as the last argument:

cargo clone cargo-clone -- foo  # Downloads into $PWD/foo

If multiple packages are downloaded at the same time or if the directory contains a trailing slash, the packages will be downloaded into subdirectories of the path provided.

cargo clone cargo-clone -- pkgs/  # Creates pkgs/cargo-clone/
cargo clone cargo serde -- pkgs2/  # Creates pkgs/cargo and pkgs/serde

Contributing

Contributions are welcome. Feel free to open a PR into develop branch.

When running locally, you can run using cargo run -- clone CRATE or cargo-clone clone CRATE.

By opening a PR you agree to license your code under Apache/MIT licenses.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].