All types of contributions are encouraged and valued.
Install Rust with Rustup using Rustup.
Fork, then clone the repo:
$ git clone {github repo}Make your change. Add tests for your change. Make the tests pass:
$ cargo testFor cargo coverage, run the following commands:
$ rustup default stable
$ rustup component add llvm-tools
$ export PATH=`rustc --print=sysroot`/lib/rustlib/x86_64-unknown-linux-gnu/bin/:${PATH}Push to your fork and submit a pull request.
For each PR branch, ensure that the source code
- is formatted with
cargo fmt - has no warnings from
clippy - has properly formatted documentation
- can build against MUSL for x86 and arm architectures
The release process strives to ensure that each release contains the following:
- A succinctly-worded release body
- A git tag with a matching version
- A copy of the pre-compiled
idlcthat was generated by the Github CI
The release process involves some automation and the following steps should be carefully followed to ensure uniformity among the releases.
Due to the structure of this repo and QUIC policies, some obvious approaches to automating releases are not possible. The current approach uses a mix of semi-manual updates with cargo-workspaces and automated releases with release-please.
Changes are introduces through Pull Requests (PRs) that are merged through squash commits.
When making changes, be sure to use Conventional Commits. That is, prefix your
commit messages with feat:, fix:, deps:, etc. Since we use squash commits for PRs, the tip of
your PR branch must contain the prefix keyword.
Version Policy
- PRs:
- modify code only
- never touch versions
- Versions are bumped only during release preparation
cargo ws changeddetermines affected crates- Patch/minor/major is chosen intentionally
- Version bumps are committed as a single release commit
Release Procedure
- A release PR will be created and updated by
release-please- CHANGELOG.md and release message body automatically updated, based on
- Updates the
release-pleasemanifest
- After 1 or more version bumps, a release PR can be merged
release-pleaserebuilds the target binaries and uploads them to the release itself.
Benefits
- Squash merges freely
mainstays clean and stable- No version churn, no Cargo.lock noise
Here is an example of the typical development flow:
- Merge 1 or more feature/patch/bug fix PRs (no version changes)
- Prepare for release
-
cargo install cargo-workspaces cargo ws changed cargo ws version --no-git-push --no-git-tag -m "chore(release): bump crate versions"- This analyzes the workspace, bumps the Cargo.toml (AND Cargo.lock) versions based solely on if any changes occur within the crate, and commits the changes.
cargo wswill prompt for each crate to specify which type of release (major, minor, or patch) is appropriate.- The release type is determined by the user
- Review the commit
- Push to
origin/main- either directly or through PR.
-
release-pleasecaptures all conventional commits through PRs and "bump" commit- Review
release-pleaserelease PR to make sure everything is captured correctly - Merge release PR and
release-pleasetakes care of the rest