Generic Rust project template for cargo-generate.
Here's an example of using this template with cargo-generate.
Example projects generated by this template are available:
- bin crate: gifnksm/rust-template-generated-bin
- lib crate: gifnksm/rust-template-generated-lib
- dependabot
- security checks
- continuous integration
- cargo test (stable toolchain and MSRV toolchain)
- cargo build (stable toolchain and MSRV toolchain)
- rustfmt
- clippy
- rustdoc
- publish-dry-run
- code coverage (codecov.io)
- continuous delivery
- publish pre-built binary for Linux, macOS, and Windows (bin crate only)
- issue template
- pull request template
- install instructions (bin crate only)
- usage instructions (lib crate only)
- README badges
- maintenance status
- license
- crates.io
- docs.rs
- MSRV
- GitHub Actions CI status
- code coverage
- liceneses (MIT or Apache-2.0)
- changelog
- contributing guideline
- code of conduct
-
Install
cargo-generate
cargo instlal cargo-generate
-
Generate your project with this template
-
For bin crate:
cargo generate --git https://github.com/gifnksm/rust-template.git --bin
-
For lib crate:
cargo generate --git https://github.com/gifnksm/rust-template.git --lib
-
-
Setup GitHub repository
- Create an empty repository on GitHub
- Push your project to GitHub
-
Install
cargo-release
cargo install cargo-release
-
Run
cargo-release
(dry-run)cargo release <release> -vv
You should check the released version and changelog updates.
-
Run
cargo-release
again (execute)cargo release <release> -vv --execute
-
Wait for GitHub Actions to finish the release process
-
Update a release on GitHub
This repository borrows many components from rust-github/template.