wasmtime-rb is a Bytecode Alliance project. It follows the Bytecode
Alliance's Code of Conduct and Organizational Code of Conduct. Code
contributions must follow the AI Tool Use Policy.
Install dependencies:
bundle install
Compile the gem, run the tests & Ruby linter:
bundle exec rake
- Update the version of
deterministic-wasi-ctxinext/Cargo.toml - Update the
wasmtime-family of crates to the new version inext/Cargo.toml. Note that this process might involve code changes in case the new version contains public facing API changes. - Open a pull request. Don't bump the gem version; merging the pull request starts the release (see below).
The gem version matches the version of the wasmtime crate it bundles, e.g.
49.0.2 bundles Wasmtime 49.0.2. The major and minor versions always match.
The patch version may drift. When the gem needs a release without a new
Wasmtime release (e.g. a fix in the gem itself), or when an upstream patch
version is already taken, the gem uses the next unused patch version, e.g. gem
X.Y.3 bundling Wasmtime X.Y.2. The changelog entry of such a release says
which Wasmtime version it bundles.
Releases are prepared by the Release bump workflow and published by the
Release tag workflow. Nothing is pushed to main directly. The workflows
pick the version following Versioning.
- Merging a pull request that updates the
wasmtimecrate to an unreleased version starts the Release bump workflow, which pushes abump/v<version>branch that bumps the version and updates the changelog. To release without a Wasmtime update (e.g. a bug fix in the gem), run the workflow manually with branchmain. - Open the pull request from the link in the workflow run's summary. Pull requests opened by workflows don't run the required checks, so they have to be opened by a maintainer.
- Review the changelog and
.github/release-matrix.json, and merge the pull request. The JSON file lists the platforms and Ruby versions the gem is built for; it pins them for later patch releases from a release branch. Merging starts the Release tag workflow, which tags the version and runs the release workflow: it pushes the gem to RubyGems and creates a draft release on GitHub. - Edit the release notes if needed and publish the draft release.
- If the release changes the supported versions, update the table in SECURITY.md.
To release a patch for an older version, e.g. 48.0.2 when main is on 49:
- If
release-<major>(e.g.release-48) doesn't exist, run the Release branch workflow manually with the major version. It creates the branch from the latestv<major>.*tag. Run it from the Actions tab, or with the GitHub CLI:gh workflow run release-branch.yml --ref main -f major=<MAJOR_VERSION> - Check that the branch still builds, since the toolchains and workflows may
have changed since its last release. Run the CI workflow on the branch, and
the Release workflow from
mainwith the branch asref. From the Actions tab, pick the release branch in "Use workflow from" for CI, andmainwith the release branch in thereffield for Release. With the GitHub CLI:The Release run is a dry run: it builds and smoke-tests the gems without publishing them. Always run it fromgh workflow run ci.yml --ref release-<MAJOR_VERSION> gh workflow run release.yml --ref main -f ref=release-<MAJOR_VERSION>main; run from a tag, the workflow releases that tag. Fix any failures through pull requests into the release branch. - Merge the patches to release into
release-<major>through pull requests. - Run the Release bump workflow manually with branch
release-<major>. - Open both pull requests from the links in the workflow run's summary:
- the release pull request into
release-<major>: fill in the release notes inCHANGELOG.md, which the changelog generator can't do for release branches; - the pull request adding the tag to
exclude-tagsin.github_changelog_generatoronmain, so that the changelog onmainskips it.
- the release pull request into
- Merge both. The Release tag workflow doesn't run on its own for release
branches: run it manually with branch
release-<major>. - Edit the release notes if needed and publish the draft release.