| Crates.io | quickstart-lib |
| lib.rs | quickstart-lib |
| version | 0.1.4 |
| created_at | 2025-05-05 00:04:49.438988+00 |
| updated_at | 2025-05-06 17:38:04.74956+00 |
| description | Library for handling template logic for cargo-quickstart |
| homepage | https://github.com/smeya/cargo-quickstart |
| repository | https://github.com/smeya/cargo-quickstart |
| max_upload_size | |
| id | 1659998 |
| size | 83,750 |
A blazing fast and opinionated cargo subcommand to bootstrap modern Rust projects with confidence and speed.
βΈ»
bin, lib, or hybrid projects..vscode/, .cargo/config.toml, .gitignore.doctor command.βΈ»
cargo quickstart my-awesome-project --bin --edition 2021 --git --license MIT
This will scaffold a full project with Git initialized, best practices set up, and documentation templates ready to go.
βΈ»
While cargo new and cargo-generate are powerful, cargo-quickstart offers fast, reproducible, and opinionated project setups without manual boilerplate, ideal for teams and solo developers alike.
βΈ»
Until published on crates.io:
git clone https://github.com/sm-moshi/cargo-quickstart
cd cargo-quickstart
cargo install --path crates/quickstart-cli
βΈ»
(See ROADMAP.md for full details.)
βΈ»
Contributions, feature ideas, bug reports are warmly welcome! Have fun! See CONTRIBUTING.md.
βΈ»
Dual-licensed under MIT OR Apache-2.0.
The template system uses a flexible, file-based approach for project scaffolding. Templates are stored in a templates/ directory at the project root, with the following structure:
/templates
/base # Common files for all projects (placed at project root)
README.md.hbs
CHANGELOG.md.hbs
CONTRIBUTING.md.hbs
CODE_OF_CONDUCT.md.hbs
.gitignore.hbs
Cargo.toml.hbs
/.vscode/ # VS Code configuration templates
settings.json.hbs
extensions.json.hbs
launch.json.hbs
tasks.json.hbs
/.cargo/
config.toml.hbs
/binary
/minimal/src/main.rs.hbs
/extended/src/main.rs.hbs
/library
/minimal/src/lib.rs.hbs
/extended/src/lib.rs.hbs
base/ are always placed at the root of the generated project (e.g., README.md, not base/README.md).binary/ and library/ are placed according to their subdirectory structure..hbs files are treated as templates using Handlebars syntax for variable substitution.Templates use a consistent set of variables:
name: Project name (used throughout all templates)project.is_binary / project.is_library: Conditional sections for project typedate.year: Dynamic year generation for documentationcargo-quickstart supports shell completions for Bash, Zsh, Fish, PowerShell, and Elvish. To generate completions, use the completions subcommand:
cargo quickstart completions <shell> [--output <path>]
--output is omitted, completions are printed to stdout.cargo quickstart completions bash > /usr/local/etc/bash_completion.d/cargo-quickstart
cargo quickstart completions zsh > "${fpath[1]}/_cargo-quickstart"
cargo quickstart completions fish | source
Generated projects include comprehensive VS Code configuration:
These configurations provide an optimal developer experience right out of the box.
Use the doctor command to check the health of your project:
cargo quickstart doctor
This analyzes your project structure, dependencies, and configuration to identify potential issues and provide recommendations for improvements.