Minimal Rust template with:
- Taskfile.yml as the primary entrypoint for local tasks, CI, and hooks
- Nightly toolchain with opinionated rustfmt.toml, clippy.toml, and
Cargo.toml[lints];clippy::pedantic/nursery/cargoenabled at the crate root - lefthook.yml for
pre-commitandpre-pushautomation - GitHub Actions running the same
taskcommands as local development - Starter docs for repository rules and review conventions
Template source: https://github.com/shuymn/rust-template (shuymn/rust-template).
This repository was initialized from a Rust project template.
Replace this README with project-specific documentation once the repository has a clear purpose, setup flow, and release process.
Install Rust (rustup). This repo pins nightly in rust-toolchain.toml (run rustup show in the repo root after clone — rustup should install it automatically). Optional: Task and Lefthook.
Primary entrypoint:
task
task build
task test
task lint
task fmt
task checkAfter installing Lefthook, enable hooks:
lefthook installRust-native equivalents (same nightly toolchain as rust-toolchain.toml):
cargo build
cargo test
cargo fmt --all -- --check # uses nightly rustfmt + rustfmt.toml
cargo clippy --workspace --all-targets --all-features --locked -- -D warningsBefore treating this as a real project, update the repository-specific parts:
- Run template initialization from the repository root. This rewrites template placeholders, removes the template-only README section, deletes
.taskfiles/, and creates a local commit.
task -t .taskfiles/template.yml init- Replace
src/main.rsand any starter code with your actual application. - Rewrite this README with your project's purpose, setup, development workflow, and release information.
- Review
AGENTS.mdanddocs/and keep only the rules and guidance you want in this repository. - Run
task checkbefore your first project-specific commit (requires Lefthook on PATH for theinstall:lefthookdependency, or runtask fmt:check,task lint,task test,task doc, andtask buildindividually).
When you rewrite this file, include only the sections your project actually needs, for example:
- Project overview
- Requirements
- Setup
- Local development commands
- Testing
- Deployment or release process
- Repository layout
- Links to deeper docs if needed