A template repository for building and publishing a Rust crate on crates.io.
- A Cargo workspace with one placeholder library crate at
crates/your-crate-name - GitHub Actions CI for formatting, clippy, tests, MSRV checks, and CodeQL
release-pleaseautomation for changelog, tags, and release PRs- A publish workflow that pushes the crate to crates.io from
v*tags - Copilot instructions and lightweight planning/design placeholders
Before your first real release, replace the placeholder values below:
- Rename the crate directory
crates/your-crate-nameif desired. - Update
your-crate-namein:Cargo.tomlcrates/your-crate-name/Cargo.tomlrelease-please-config.json
- Replace the example metadata URLs, author, and documentation settings in
Cargo.toml. - Replace the placeholder library code with your actual crate implementation.
- Set the repository secrets required for releases:
RELEASE_PLEASE_TOKENCARGO_REGISTRY_TOKEN
Requires Rust 1.97 or newer.
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --lockedMerging conventional commits to main allows release-please to open or update
release PRs. Merging a release PR creates a v<version> tag, which triggers the
crates.io publish workflow.