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. ๐
First make sure you've done:
cargo install cargo-generate
.
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
Coming soon - Suggest a template.
- 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.
If you use these templates repeatedly, be sure to favorite them for quicker access!
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.