The usual process to make a contribution is to:
- Check for existing related issues on GitHub
- Fork the repository and create a new branch
- Make your changes
- Make sure formatting, linting and tests passes.
- Add tests if possible to cover the lines you added.
- Commit, and send a Pull Request.
Install dependencies:
rustup update
rustup toolchain install nightly
rustup component add rustfmt clippy
cargo install cargo-tarpaulin git-cliff cargo-outdated
pipx install pre-commit
pre-commit install
Run tests:
cargo test --all-features
Tests with coverage:
cargo tarpaulin -p ptrie --doc --tests --all-features --out html
Start web server for the cov report:
python -m http.server
cargo fmt
cargo clippy --all --all-targets --all-features
Generate docs locally:
cargo doc --all --all-features
Start web server for the generated docs:
python -m http.server --directory target/doc
Running benchmarks requires to enable rust nightly: rustup default nightly
cargo bench
git cliff -o CHANGELOG.md
Publishing artifacts will be done by the build.yml
workflow, make sure you have set the following tokens as secrets for this repository: CRATES_IO_TOKEN
, CODECOV_TOKEN
-
Make sure dependencies have been updated:
cargo update cargo outdated
-
Script to automatically bump the version, update the changelog, then create and push a new tag to GitHub:
./.github/release.sh 0.5.0
-
The
release.yml
workflow will automatically create the release on GitHub, and publish to crates.io.