Cargo subcommand to start a new Rust project from a boilerplate/template repository.
git
Install cargo-use with cargo
cargo install cargo-use
cargo use <user_or_org_name>/<repo-name>
or
cargo use https://github.com/<user_or_org_name>/<repo-name>
Default:
cargo use i4o-dev/startrs
Custom project name:
cargo use i4o-dev/startrs --name test-project
With additional dependencies:
cargo use i4o-dev/startrs --with tokio axum
- Repo could include full URL or just
<username>/<repo>
format. Both should work. - Change name in
Cargo.toml
if name is given - Unset git remote after the repo is created