This repository is intended to be a template for Rust projects hosted on GitHub.
Makefor project interactions, except forcargo-native actions- Local and CI implementations
- Pre-push git hooks for fast feedback
- Fast CI workflows for near-immediate Pull Request validations
- GitHub Actions static analysis and auditing
- Strict workspace-wide linting configuration
- Dependency auditing
- Unused dependencies
- Dependency vulnerability checks
- Dependency licenses
- Commit (Pull Request) standards and automated Release handling
- Modern and fast testing
nextestcargo-llvm-covfor coverage
- Benchmarking
- GitHub templates
CODEOWNERS- Dependabot
- Pull request template
- Bug report template
- Feature request template
- Security policy
- Code of conduct
- Contributing guidelines
- Sensible default dependencies
- Project defaults
LICENSEfile
- macOS used for local development
mainwill be the default git branch
- The separation between "template_lib" and "template_bin" crates is intentional, as this template prefers explicit API interfaces rather than shared "core" code. However, this, of course, can be easily modified to your liking.
-
Update and uncomment
PROJECT_NAMEinMakefile. -
Delete
crates/template_lib/CHANGELOG.mdandcrates/template_bin/CHANGELOG.md. -
Update
.github/CODEOWNERS. -
Update
template_binandtemplate_libcrates.- Crate names and directories (if desired)
- Note:
release-plzandcargo-semver-checklook atcrates.ioso be conscious of that when selecting names if you are not planning to publish
- Note:
- Update "
bin" crate dependency to "lib" crate - Update
release-plz.tomlto new names
- Crate names and directories (if desired)
-
Update workspace
Cargo.toml.workspace.packagesectionworkspace.metadatasection
-
Use GitHub pages for docs and benchmark
-
Create
gh-pagesbranchgit checkout --orphan gh-pages git rm -rf . git commit --allow-empty -m "Initial commit" git push -u origin gh-pages
-
Create ruleset for
gh-pages -
Configure GitHub repo settings for GitHub Pages
- Deploy from a branch (
gh-pages)
- Deploy from a branch (
-
Enable deploying documentation in
documentation-generate.yml -
Update
benchmark.ymlto enable historical storage and PR comments of benchmarks
-
-
Update
LICENSE. -
Update or replace this
README.md. -
Update GitHub repo settings
- Pull Request settings
- Disallow merge commits and rebase merging
- Only allow squash merging
- Default commit message should be Pull Request title (or some variation)
- Always suggest updating pull request branches
- Automatically delete head branches
- Ruleset
- Default branch
- Require linear history
- Require pull request before merging
- Require review from code owners
- Squash as the allowed merge method for Pull Requests
- Require status checks to pass
- audit
- benchmark-compare-pr
- format-check
- licenses-check
- lint-check
- pr-title-validate
- unused-dependencies-check
- zizmor
- test (macos-latest)
- test (ubuntu-latest)
- test (windows-latest)
- Require branches to be up to date before merging
- Block for pushes
- Default branch
- Workflow permissions (Settings → Actions → General)
- Read and write permissions
- For
gh-pagesupdates
- For
- Allow GitHub Actions to create and approve pull requests
- Read and write permissions
- Pull Request settings
-
Interact with the repo
make help -
Initialize your development environment
make hooks make deps