3 unstable releases
| 0.2.1 | Sep 18, 2025 |
|---|---|
| 0.2.0 | Sep 18, 2025 |
| 0.1.0 | Sep 18, 2025 |
#350 in Cargo plugins
11KB
190 lines
cargo-setup
A Cargo subcommand that scaffolds new crates with extra polish.
Think of it as cargo new but with README.md, LICENSE, tests/, benches/, and metadata auto-filled from your cargo-me profile.
✨ Features
- Wraps
cargo newinternally — no need to run it separately. - Auto-fills
authors,license, andrepositoryinCargo.tomlfrom yourcargo-meprofile. - Adds
README.mdwith repo/author info. - Adds
LICENSEfile with year + organization from profile. - Creates
tests/basic.rsandbenches/bench.rsfolders. - Supports
--binor--lib(just likecargo new).
📦 Installation
cargo install cargo-setup
Make sure you also have cargo-me installed and initialized, since cargo-setup uses the profile stored in ~/.cargo-me.toml.
cargo install cargo-me
cargo me init
🚀 Usage
Create a new binary crate
cargo setup myapp --bin
Create a new library crate
cargo setup mylib
Override license
cargo setup mycrate --license Apache-2.0
📊 Example workflow
-
Configure your profile once with
cargo-me:cargo me init cargo me set name "JD Plumbing" cargo me set email "jdplumbingsoflo@gmail.com" cargo me set github "JDPlumbing" cargo me set license "MIT" -
Scaffold new crates with extras in one command:
cargo setup shortid-rs --bin -
Resulting project structure:
shortid-rs/ ├── Cargo.toml # with authors/license/repo already filled ├── src/main.rs ├── README.md ├── LICENSE ├── tests/basic.rs └── benches/bench.rs
⚖️ License
MIT License. See LICENSE for details.
Dependencies
~2–14MB
~113K SLoC