A simple Rust project template with pre-configured linting, formatting, security scanning, git hooks, and CI.
Install the pinned toolchain, then the project tools and dependencies:
proto use # installs every toolchain pinned in .prototools
task install_tools # project tools + dependencies + git hooksDay to day:
task sync # install the exact deps in the lockfiles (after cloning or pulling)
task upgrade # bump all deps to their latest versions and update the lockfiles| Command | Description |
|---|---|
task install_tools |
Install tools, dependencies and git hooks |
task sync |
Install exact dependencies from the lockfiles |
task upgrade |
Upgrade all dependencies to latest |
task format |
Run cargo fmt |
task lint |
Run clippy with -D warnings |
task deadcode |
Check for dead code |
task security |
Security and license checks (cargo deny) |
task unused_deps |
Find unused dependencies (cargo machete) |
task test |
Run tests with nextest |
task test:doc |
Run doc tests |
task build |
Build the project |
task run_ci |
Run the CI pipeline locally |
Every language and tool version lives in .prototools — one file, read by
both proto use locally and moonrepo/setup-toolchain in CI. To upgrade a
language, edit that one line.
- rust-lang/rustfmt - Rust code formatter
- rust-lang/rust-clippy - Rust linter with pedantic, nursery, and cargo lint groups
- nextest-rs/nextest - Next-generation test runner for Rust
- EmbarkStudios/cargo-deny - Security advisories, license compliance, and dependency checks
- bnjbvr/cargo-machete - Unused dependency detection
- go-task/task - A task runner / simpler Make alternative
- evilmartians/lefthook - Fast and powerful Git hooks manager
- conventional-changelog/commitlint - Lint commit messages