Releasing
View SourceWhat to do for a release of erlang-wasmtime, and separately for a Wasmtime
version bump. You need push rights, gh, and a machine of each
architecture (x86_64 and aarch64) for the shims.
Release the library
CHANGELOG.md: turn "unreleased" into the version and date.src/erlang_wasmtime.app.src: bumpvsn.make checkon a full build; the ASan and runtime-only recipes in CONTRIBUTING.md if the NIF changed since the last release.- Commit, tag
v<version>, push the tag. CI runs on the tag. rebar3 hex publish. The package holdssrc/,c_src/,scripts/,priv/shims/and the docs; the CI job "Hex package stays under the 8 MB cap" is the size check. The Wasmtime library is not in the package; it is downloaded at build time.
Bump Wasmtime
The pinned version is scripts/wasmtime.version. Everything below is
tied to it: the upstream archives, this repo's runtime archives, the CLI
that compiles the shims, the precompiled fixtures.
- Edit
scripts/wasmtime.version. - Download the six upstream C API archives (
x86_64andaarch64forlinux,musl,macos) and replace their lines inscripts/wasmtime.sha256. - Set
scripts/wasmtime-runtime.revto1for a new Wasmtime version (bump it instead when only the build recipe changed), then run the runtime workflow:gh workflow run wasmtime-runtime.yml. It builds the runtime-only library on native runners for every platform plus the full FreeBSD library, and attaches them to the releasewasmtime-runtime-<version>-r<rev>. Assets are immutable: a rebuild gets a new revision and a new release, so a tagged erlang_wasmtime always downloads exactly what it pinned. Paste the workflow'sSHA256SUMSintoscripts/wasmtime-runtime.sha256and the FreeBSD line intoscripts/wasmtime.sha256. - Any change to
scripts/build-wasmtime.shor the workflow after the archives were built means step 3 again with a bumped revision before the release: the archives must come from the recipe the tag ships. - Pin the CLI archives (
wasmtime-<version>-aarch64-macos.tar.xzandx86_64-linux) inscripts/wasmtime-cli.sha256, then runscripts/precompile-shims.shon an aarch64 machine and on an x86_64 machine; commit the 14 files inpriv/shims/. The flags in the script must matchmake_config()inc_src/nif_engine.c;shim_files_loadin the tests fails when they drift. - Check the C API for changes that matter here:
wasmtime/conf.hfeature macros, thewasmtime_val_tlayout, the reference API (*_unrootsignatures),wasi.hstdio hooks.docs/design.mdlists what the code relies on. rebar3 compile && rebar3 cton a full build, then the runtime-only recipe with fresh fixtures fromscripts/precompile-fixtures.escript. The runtime-only CI job proves the full and runtime builds still accept the same precompiled modules.CHANGELOG.md: note the new Wasmtime version.README.mdanddocs/features.mdmention the major version.