项目作者: cargo-generate

项目描述 :
cargo, make me a project
高级语言: Rust
项目地址: git://github.com/cargo-generate/cargo-generate.git
创建时间: 2018-05-29T12:35:37Z
项目社区:https://github.com/cargo-generate/cargo-generate

开源协议:Other

下载




# 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

  1. cargo install cargo-generate

or if you have no time, use cargo-binstall:

  1. cargo binstall cargo-generate

Usage

  1. # templates on github
  2. cargo generate --git https://github.com/username-on-github/mytemplate.git
  3. # or just
  4. cargo generate username-on-github/mytemplate
  5. # templates on other git platforms
  6. cargo generate gl:username-on-gitlab/mytemplate # translates to https://gitlab.com/username-on-gitlab/mytemplate.git
  7. cargo generate bb:username-on-bitbucket/mytemplate # translates to https://bitbucket.org/username-on-bitbucket/mytemplate.git
  8. cargo generate sr:username-on-sourcehut/mytemplate # translates to https://git.sr.ht/~username-on-sourcehut/mytemplate (note the tilde)
  9. # this scheme is also available for github
  10. cargo generate gh:username-on-github/mytemplate # translates to https://github.com/username-on-github/mytemplate.git
  11. # for a complete list of arguments and options
  12. 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!