36 releases (16 breaking)

Uses new Rust 2021

0.16.0 Jul 25, 2022
0.14.0 May 31, 2022
0.13.0 Feb 8, 2022
0.11.1 Dec 3, 2021
0.1.1 Jul 27, 2018

#127 in Cargo plugins

Download history 2564/week @ 2022-04-21 2300/week @ 2022-04-28 2336/week @ 2022-05-05 2498/week @ 2022-05-12 2198/week @ 2022-05-19 2742/week @ 2022-05-26 2603/week @ 2022-06-02 2720/week @ 2022-06-09 2929/week @ 2022-06-16 2373/week @ 2022-06-23 2483/week @ 2022-06-30 2220/week @ 2022-07-07 2725/week @ 2022-07-14 2727/week @ 2022-07-21 2819/week @ 2022-07-28 3701/week @ 2022-08-04

12,367 downloads per month
Used in 5 crates

MIT/Apache

170KB
4.5K SLoC

cargo-generate

Build status crates.io dependency status Chat on Matrix

cargo, make me a project

cargo-generate is a developer tool to help you get up and running quickly with a new Rust project by leveraging a pre-existing git repository as a template.

Here's an example of using cargo-generate with this template: demo.gif

Documentation

See the cargo-generate guide for complete documentation.

Templates

One place to find templates is to look for the cargo-generate topic on GitHub.

Quickstart

Installation

cargo install cargo-generate

Usage

# templates on github
cargo generate --git https://github.com/username-on-github/mytemplate.git

# or just
cargo generate username-on-github/mytemplate

# templates on other git platforms
cargo generate gl:username-on-gitlab/mytemplate
cargo generate bb:username-on-bitbucket/mytemplate

# this scheme is also available for github
cargo generate gh:username-on-github/mytemplate

# for a complete list of arguments and options
cargo help generate

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. If you want to contribute to cargo-generate, please read our CONTRIBUTING notes.

cargo-generate would not be what it is today without the wonderful contributions from the community. Thank you!

Dependencies

~26–63MB
~1M SLoC