rust-templates
Templates for creating rust projects with a GitHub-managed lifecycle with cargo-generate. ποΈπ
What you get:
- PR build validation using
cargo
. βοΈ - Automated Release PR generation using release-please. π’
- Automated crates.io publishing (after merging a Release PR). π¦
- Dependabot automated dependency update PR generation. π
- A toolchain file for automatic rust toolchain configuration. ποΈ
- A
justfile
for common developer actions - for use with the excellent just command runner. π§βπ» - The MIT License. π
Quickstart
First make sure you've done:
cargo install cargo-generate
.
basic
Use this template for basic rust projects. E.g. A single crate binary or lib, a workspace with a root crate.
cargo generate bengreenier/rust-templates.git basic
Others
Coming soon - Suggest a template.
Configuration
For publishing to crates.io:
- Create an API access token here.
- Add it as a GitHub repository secret named
CARGO_REGISTRY_TOKEN
. .github/release.yml
will use this secret when publishing a release.
Favorites
If you use these templates repeatedly, be sure to favorite them for quicker access!
Supporting the project
If this project saved you some time, and you'd like to see it continue to be invested in, consider buying me a coffee. β
Also, the setup here is largely inspired by Amos' post: My ideal Rust workflow consider supporting them too.