Thanks for contributing! To keep the repository consistent and avoid regressions we provide a Git pre-commit hook that runs:
cargo fmt --all -- --check(formatting)cargo clippy --all-targets -- -D warnings(lints)cargo test --workspace(tests)
How to enable the hook (recommended):
-
Run the install script from the repository root:
./scripts/install-hooks.sh
This sets
git config core.hooksPath .githooksand makes the pre-commit hook executable. -
Verify with a test commit or run the checks manually:
cargo fmt --all -- --check && cargo clippy --all-targets -- -D warnings && cargo test --workspace
If you prefer not to enable the hook globally for the repository, you can still run the checks locally before committing.
Thanks for keeping the codebase healthy!
Releases are automated via GitHub Actions. To publish a new version:
-
Update the version in
Cargo.toml:version = "0.2.0"
-
Commit and push the version bump:
git add Cargo.toml git commit -m "Bump version to 0.2.0" git push origin main -
Create and push a tag matching the version:
git tag v0.2.0 git push origin v0.2.0
The publish.yml workflow will:
- Run the full CI test suite
- Verify the tag version matches
Cargo.toml - Publish to crates.io
A CRATES_TOKEN secret must be configured in the repository settings:
- Generate a token at https://crates.io/settings/tokens
- Add it as a repository secret: Settings → Secrets → Actions → New repository secret
You can trigger a dry-run publish manually via the Actions tab:
- Go to Actions → "Publish to crates.io"
- Click "Run workflow"
- Check "Dry run" to test without publishing