Repository navigation
function-wasm-v1.0.0
function-wasm 1.0.0 is the first stable release: from here, everything Compatibility lists changes only through its deprecation policy. It's also a breaking release from 0.6.0. ABI v1 core modules no longer run, the Input's group and the project's names changed with no alias, and a step's config now names a field of the composite resource. Every module and every Composition needs the changes below. The sandbox hasn't had an independent security review.
Before you upgrade
A module published for 1.0.0 declares contract: wasm@1.0, which 0.6.0 doesn't read, so the Function and the Compositions that name the new module digests change together. Run function validate from the 1.0.0 image over your Compositions first: it prints the Input refusals below without a cluster, and with --resolve the module refusals too (Check a composition).
Rebuild every ABI v1 module as an ABI v2 component. 0.6.0 ran a core module with a deprecation warning, and 1.0.0 refuses it at load (#149):
cannot load module …: module is a core module, which function-wasm 1.0.0 no longer runs (ABI v1 was removed); build it as an ABI v2 component (docs/abi-v2.md)
For a Go guest, guestfn build turns the core module go build emits into a component. A guest written against ABI v1 moves onto a current scaffold: run guestfn init, then copy the function over.
Move every module project to the current guestfn and publish it again. Rename wasmfn.yaml to guestfn.yaml, replace abi: 2 with contract: wasm@1.0 and delete minRuntime if the file sets it. guestfn build refuses an old field by name, such as unknown field "abi". Make wit/world.wit include guestfn:function/function@1.0.0, or guestfn:function/function-sync@1.0.0 if the toolchain can't async-lift run, add wit/deps/ to .gitignore and run guestfn wit update. Then run guestfn build and guestfn push, and put the new digest in the Composition. A module that was already a component needs the push too. The manifest layer's media type changed from application/vnd.wasmfn.manifest.v1+json to application/vnd.guestfn.manifest.v1+json, and 1.0.0 doesn't read the old one: a module pushed by an earlier guestfn loads without its manifest and is granted nothing it requires (#244, #251, #302, #317).
Change the apiVersion of every Input to guestfn.crossplane.io/v1. The fields are the same. The group is the one function-wasm and function-oci both read, and the runtime refuses the old group, v1 and v1beta1 alike, on every request (#246):
apiVersion wasm.fn.crossplane.io/v1 is no longer served; write apiVersion: guestfn.crossplane.io/v1 (the same fields)
Move each step's configuration into the composite resource. On 0.6.0 the Composition author wrote the value under the Input's config. On 1.0.0 config is an object of from and allowEmpty, and the runtime refuses a value written there by its first key (#268):
config.greeting is not a field of config, which has from and allowEmpty only: the module's configuration is written in the composite resource, in the field config.from names
Declare the field in the composite resource definition, write the values in the composite resource and set config: {from: spec.config} on the step. config.allowEmpty: true runs the module unconfigured when the field is unset (Input reference).
Rename --max-module-size to --module-size-limit in the DeploymentRuntimeConfig. The old flag has no alias, and the runtime exits at startup when it's given. --module-size-limit, --module-timeout, --module-memory-limit and --ttl also read an environment variable now: MODULE_SIZE_LIMIT, MODULE_TIMEOUT, MODULE_MEMORY_LIMIT and TTL (#327).
Move the cache mount from /tmp/function-wasm-cache to /tmp/guestfn-cache, and give each pod a volume of its own. 0.6.0 documented a volume shared between pods as safe. On 1.0.0 each process refuses the compiled artifacts another process wrote, and pods on one volume overwrite each other's (#267, #214, Cache storage).
Rename the metric series in dashboards and alerts: function_wasm_* is guestfn_*, with the same labels. function_wasm_module_loads_total went with ABI v1. The grpc_server_* series keep their names (#267, Metrics).
Pin any published example again. The artifacts under ghcr.io/jonasz-lasut/wasmfn/examples/<name> no longer exist. The examples are now ghcr.io/jonasz-lasut/guestfn/examples/wasm-go, wasm-rust and wasm-ts, signed keyless by https://github.com/jonasz-lasut/guestfn/.github/workflows/publish-examples.yml@refs/heads/main (#248, #274).
Quote YAML values that must remain strings. The runtime, function validate and guestfn now read YAML with a YAML 1.2 parser: unquoted yes, no, on and off are booleans, 0755 and 1_000 are numbers, a merge key merges and .inf is refused. A parse failure reads cannot parse <file>: line 3 column 11: unclosed bracket '[' (#217).
For operators
Keyless cosign signatures
0.6.0 verified key-based cosign 3 signatures only, and a module signed keyless counted as unsigned. 1.0.0 verifies a keyless Sigstore bundle against a trusted root. --cosign-trusted-root <trusted_root.json> reads the root from a file, the air-gapped mode. --cosign-trust-instance public-good|staging|github fetches it over TUF and refreshes it every --cosign-tuf-refresh (default 1h). You can't set both. A trusted root alone admits nothing: the operator policy needs a trustSigner rule that permits the certificate's issuer and identity for the module's repository, default-deny. The runtime refuses any other signer:
keyless signature by <identity> (issuer <issuer>) is not trusted for <repository>: no trustSigner rule in the operator policy permits it
If no root can be fetched or read from the cache at startup, the runtime serves anyway and refuses keyless signatures until a retry succeeds. guestfn_trusted_root_refreshes_total and guestfn_trusted_root_last_refresh_timestamp_seconds report the refresh. The refusal for a required signature the runtime can't verify now names both verifiers: the operator policy requires a cosign signature, but the runtime has neither --cosign-key nor --cosign-trusted-root to verify it (Signatures, #179, #192).
composeResource fences a module's output
On 0.6.0 nothing judged a module's output. A new Cedar action, composeResource, lets the Input's compositionPolicy and the operator's --sandbox-policy-file restrict which kinds a module may add, change or remove, the composite resource's own desired state included. After the run the runtime compares the response's desired state with the request's and judges every change. A refused change is a fatal result, and the runtime applies none of the module's output:
module oci …: composed apps/Deployment "deployment" (modify), which the compositionPolicy does not permit (composeResource)
A layer with no rule for the action narrows nothing. An existing policy behaves as before (Cedar policy reference, #195).
requireResource fences a module's reads
Through the response's requirements a module can ask Crossplane for any resource the Function's RBAC lets Crossplane read, and 0.6.0 relayed every ask. The requireResource action judges each selector by kind, name or labels, and namespace, in both policy layers, again only where a layer has a rule for it. The runtime doesn't relay a refused ask:
module oci …: required core/Secret "db-password" in namespace "team-b" (requirements.resources["db"]), which the compositionPolicy does not permit (requireResource)
The security audit done for 1.0 asked for this fence (the read fence, #233).
Compiled artifacts are valid for one process
Wasmtime loads a compiled artifact as native code with no check of its own, so 0.6.0 would have run a file planted in the compiled cache by someone with write access to the directory. Each process now signs the artifacts it writes with an HMAC under a key it draws at startup, and refuses any other. There's no flag and no mounted key: a key behind a flag was rejected as one more thing for every operator to configure. A restarted pod now compiles every module again, with or without a volume. A volume still saves the fetch, and --warm-modules moves the compile ahead of readiness (Trust model, design record, #214).
A bound on cold loads: --module-compile-timeout
On 0.6.0 a compile had no time bound, and the request's deadline didn't cut it. --module-compile-timeout (MODULE_COMPILE_TIMEOUT, default 0s, unbounded) bounds the fetch and compile of a module that isn't cached. Past it the request fails with cannot load module …: compile exceeded --module-compile-timeout <duration>, counted as the timeout event of guestfn_module_cache_events_total. The compile finishes on its own and stores its artifact for the next request (Runtime flags, #203).
The memory ceiling covers the whole run
--module-memory-limit and limits.memory now bound a run's linear memories and tables together, the initial memory included. On 0.6.0 the runtime charged table growth to neither the ceiling nor the --max-total-run-memory pool, and applied the ceiling to each region on its own. A denied table.grow fails inside the guest as a denied memory.grow does, and guestfn_module_memory_denials_total counts both. No guest in the test matrix is affected (#203, #213).
Warm requests don't contact the registry
The runtime now caches a module's manifest by digest, in memory and on disk. On 0.6.0 a warm request for an OCI module still contacted the registry, which made the registry an availability dependency of every request. The egress audit line's bytes field now counts body bytes, where it counted base64 characters (#211).
The manual is a documentation site
The README was the manual through 0.6.0. The manual is now at https://jonasz-lasut.github.io/guestfn/, with a Cedar policy reference and a Troubleshooting page that lists each refusal. The repository is jonasz-lasut/guestfn. The package is still ghcr.io/jonasz-lasut/function-wasm and xpkg.upbound.io/jonasz-lasut/function-wasm (#157, #267).
For module authors
The runtime reads configuration from the composite resource
GetConfig in every guest reads input.config as before. The runtime now reads the value from the field the step's config.from names, checks it against the manifest's config.schema and writes it into the forwarded Input. The value must be an object. The static value went because a module chosen through module.from is code the Composition author didn't pick, with a schema they haven't seen (design record). guestfn scaffold composition writes config: {from: spec.config} and a commented definition fragment from the schema (#268).
The manifest is guestfn.yaml and declares a contract
contract: wasm@1.0 replaces abi: 2, and the runtime refuses a version its engine doesn't offer before it reads the module: contract wasm@0.9 is not one the wasm engine implements: wasm@1.0. minRuntime is gone, since the contract version says what a module needs. composes and requires.resources are new and advisory: the kinds a module writes, and the kinds it asks Crossplane for. The runtime grants and refuses nothing on them, function validate --resolve warns where a policy layer would refuse one, and guestfn scaffold composition writes the matching permits. config.schema must be self-contained. The runtime refuses a $ref to a URL or a file with $ref … is external; config.schema must be self-contained, and pattern takes the regex crate's syntax, which has no look-around and no back-references (Module manifests, #244, #251, #302, #195, #233, #203).
The world is guestfn:function@1.0.0, pulled at build
The contract package was the draft wasmfn:function@2.0.0-draft at 0.6.0. It's final as guestfn:function@1.0.0, published at ghcr.io/jonasz-lasut/guestfn/function, with a second world, function-sync, whose run is sync. Only Rust guests could include the package while its one world's run was async, and every other guest restated it. Now every guest includes one of the two worlds. A guest commits wit/world.wit and guestfn.lock, which pins the digest of the contract and of every WASI package the world imports. guestfn build pulls those digests into wit/deps/, guestfn wit fetch does the same for a build that doesn't go through it, and guestfn wit update moves a guest to a newer published version. The runtime refuses a component that fails the typecheck with component does not implement the guestfn:function@1.0.0 world: …. Within 1.x the world may only gain imports (ABI v2, #152, #317, #319, #321, #322).
Scaffolds for Go, Rust, TypeScript and Python
guestfn init has a template for each language with an official function-sdk-<lang>. The zig and c templates retired on that rule, and guestfn build still builds a build.zig project. Zig and C remain as examples, beside new ones in Odin, MoonBit and C++. The Rust scaffold builds on stable Rust 1.100, which made wasm32-wasip3 a stable target: its rust-toolchain.toml named a dated beta at 0.6.0 and names stable now. guestfn has releases of its own, with prebuilt binaries for Linux and macOS (Other languages, #269, #158, #159, #238, #339, #300).
WebAssembly proposals the engine refuses
The engine accepts WebAssembly 2.0 plus extended-const and relaxed-simd, the latter with its deterministic semantics. It refuses threads, GC, function references, exceptions, tail calls, multi-memory and memory64 at compile. No scaffold or example uses one. A compile refusal now includes Wasmtime's cause, where 0.6.0 printed its first line only (#203, #216):
cannot load module …: cannot compile module: failed to parse WebAssembly module: threads support is not enabled
World, Wasmtime and WASI versions
Serves guestfn:function@1.0.0 on Wasmtime 50.0.1: WASI 0.2.12 (cli, clocks, http, io) for the sync scaffolds and WASI 0.3.0 (cli, clocks, http) for the rust scaffold. Wasmtime moved from 49.0.2. WASI 0.2.12 and 0.3.0 are the versions the 0.6.0 scaffolds vendored, so no guest moves its WASI imports for this release.
Merged pull requests
- feat!: remove ABI v1 from the runtime by @jonasz-lasut in #149
- feat(guestfn): say when a core module is one wrap away by @jonasz-lasut in #151
- feat!: freeze the world as wasmfn:function@2.0.0 by @jonasz-lasut in #152
- feat!: stabilise the Input as v1 by @jonasz-lasut in #153
- docs(release): state served versions in the notes by @jonasz-lasut in #154
- docs: list the untested component-capable languages by @jonasz-lasut in #156
- docs: move the manual to an mdBook site by @jonasz-lasut in #157
- chore(examples): name the egress fixture response.txt by @jonasz-lasut in #160
- feat(examples): add hello-odin, an Odin ABI v2 guest by @jonasz-lasut in #158
- feat(examples): add hello-moonbit, an ABI v2 guest by @jonasz-lasut in #159
- ci(e2e): fetch the moon registry index by @jonasz-lasut in #163
- chore(deps): update rust crate function-sdk-rust to v0.3.1 by @renovate[bot] in #162
- fix(examples): quiet hello-moonbit's generators by @jonasz-lasut in #164
- docs(site): highlight Cedar code blocks by @jonasz-lasut in #167
- chore(deps): update github-actions by @renovate[bot] in #161
- chore(deps): update rust by @renovate[bot] in #166
- chore(deps): update rust crate wasmtime to 49.0.4 [security] by @renovate[bot] in #171
- chore(deps): update github-actions by @renovate[bot] in #169
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to 2827063 by @renovate[bot] in #176
- chore(deps): update dependency wasmtime-wasi-http [security] by @renovate[bot] in #173
- chore(deps): update rust by @renovate[bot] in #175
- chore(deps): update dependency crossplane/crossplane to v2.4.3 by @renovate[bot] in #177
- chore(deps): update dependency @highlightjs/cdn-assets to v11.12.0 by @renovate[bot] in #168
- chore(deps): update wasmtime to v50 by @renovate[bot] in #178
- chore(deps): update rust crate wasi-preview1-component-adapter-provider to 49.0.4 by @renovate[bot] in #170
- chore(deps): update rust by @renovate[bot] in #182
- chore(deps): update docker/login-action action to v4.7.0 by @renovate[bot] in #181
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to 5bb9326 by @renovate[bot] in #180
- Verify keyless cosign signatures with sigstore-verify (spike) by @jonasz-lasut in #179
- Unify the test suites around a Kubernetes-native e2e suite by @jonasz-lasut in #187
- ci(e2e): run from a /e2e comment only by @jonasz-lasut in #188
- test: share the suites' fixtures and stage through testing modules by @jonasz-lasut in #190
- ci: pin the zig download, trim the docker context by @jonasz-lasut in #191
- feat: fetch and refresh the Sigstore trusted root over TUF by @jonasz-lasut in #192
- ci: run the e2e suite on the three supported Crossplane minors by @jonasz-lasut in #193
- ci(e2e): cache the Rust builds and guest dependencies by @jonasz-lasut in #194
- ci(e2e): opt the caches into write mode by @jonasz-lasut in #196
- feat: fence what a module composes (composeResource) by @jonasz-lasut in #195
- chore(deps): update rust by @renovate[bot] in #184
- chore(deps): update rust by @renovate[bot] in #197
- chore(deps): update module golang.org/x/net to v0.62.0 [security] by @renovate[bot] in #198
- chore(deps): update dependency node to v26 by @renovate[bot] in #199
- docs: lint the prose with Vale and close out the draft one-pagers by @jonasz-lasut in #201
- docs: rewrite the manual and refresh the design records by @jonasz-lasut in #202
- Security audit: the before-1.0 items by @jonasz-lasut in #203
- Performance audit: the three landed improvements by @jonasz-lasut in #211
- Save the Rust caches on main only by @jonasz-lasut in #220
- Check the memory ceiling per run, not per region by @jonasz-lasut in #213
- Key the compiled artifacts per process by @jonasz-lasut in #214
- Replace the unmaintained serde_yaml with serde-saphyr by @jonasz-lasut in #217
- Print wasmtime's cause on a compile refusal by @jonasz-lasut in #216
- Describe the runtime without the Go history by @jonasz-lasut in #219
- chore(deps): update wasmtime by @renovate[bot] in #222
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to 7096732 by @renovate[bot] in #221
- chore(deps): update rust crate wasi-preview1-component-adapter-provider to v50 by @renovate[bot] in #223
- chore(deps): update dependency errata-ai/vale to v3.26.0 by @renovate[bot] in #224
- chore(deps): lock file maintenance by @renovate[bot] in #226
- chore(renovate): group kube with k8s-openapi by @jonasz-lasut in #229
- chore(deps): update rust by @renovate[bot] in #200
- chore(renovate): leave kube-openapi to apimachinery by @jonasz-lasut in #231
- chore(deps): update kube by @renovate[bot] in #230
- chore(deps): update github-actions by @renovate[bot] in #186
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to 671a621 by @renovate[bot] in #228
- chore(deps): update examples by @renovate[bot] in #225
- docs: propose the read fence (requireResource) by @jonasz-lasut in #232
- feat: fence the response's requirements (requireResource) by @jonasz-lasut in #233
- chore(deps): update rust crate serde-saphyr to v2.1.1 by @renovate[bot] in #234
- chore(deps): update examples by @renovate[bot] in #235
- chore(deps): lock file maintenance by @renovate[bot] in #236
- docs: sync the design records index and hold it to the records by @jonasz-lasut in #237
- feat(examples): cert-rotator, a C++ guest over mbedTLS by @jonasz-lasut in #238
- refactor: name the manifest guestfn.yaml, its layer vnd.guestfn by @jonasz-lasut in #244
- feat!: the Input is guestfn.crossplane.io/v1, its CRD generated by @jonasz-lasut in #246
- refactor: an Engine trait behind the runtime; manifest type by @jonasz-lasut in #247
- ci: publish the examples by hand, apart from the release by @jonasz-lasut in #248
- chore(deps): update rust crate schemars to v1.2.3 by @renovate[bot] in #249
- docs: design record for the OCI runtime by @jonasz-lasut in #240
- docs: module configuration from the composite resource (design record) by @jonasz-lasut in #256
- feat(oci): the OCI runtime, first build by @jonasz-lasut in #251
- Split the publish workflow per function and move the WIT publish out by @jonasz-lasut in #259
- The module manifest as a layer of the image by @jonasz-lasut in #261
- The project is guestfn: crates, contract names, docs per runtime by @jonasz-lasut in #267
- The examples named function--, and function-oci-go by @jonasz-lasut in #266
- config.from: the module's configuration from the composite resource by @jonasz-lasut in #268
- The zig and c templates retire; the examples stay by @jonasz-lasut in #269
- function-oci: a stalled guest is a lost run; 64 MiB of VM overhead by @jonasz-lasut in #273
- The examples publish under guestfn/examples/- by @jonasz-lasut in #274
- The README is guestfn; a README and an extensions root per function by @jonasz-lasut in #275
- The e2e workflows for two functions by @jonasz-lasut in #276
- feat(extensions): add the function-oci icon by @jonasz-lasut in #277
- feat(oci): restore a VM snapshot per image by @jonasz-lasut in #278
- The e2e suite on the examples published under guestfn/examples by @jonasz-lasut in #282
- guestfn inspect and manifest show read an image index by @jonasz-lasut in #283
- function-oci: the VMM's API request in one write, and a lifecycle e2e race by @jonasz-lasut in #285
- function-oci: VM snapshots in the compiled store by @jonasz-lasut in #286
- The OCI runtime's record at the decisions of 2026-11-09 by @jonasz-lasut in #288
- Renovate moves both Firecracker checksums by @jonasz-lasut in #290
- function-oci: VM snapshots at warm-up, an e2e profile, --enable-vm-snapshots by @jonasz-lasut in #291
- Compatibility: what function-oci promises at 0.x by @jonasz-lasut in #293
- function-oci: the weekly CVE scan by @jonasz-lasut in #294
- chore(deps): update dependency firecracker to v1.18.0 by @renovate[bot] in #289
- function-oci: restoring a snapshot under load, in the e2e suite by @jonasz-lasut in #295
- function-oci: count the VM suite; restores side by side by @jonasz-lasut in #296
- function-oci's records: KVM only, egress after 0.1, #279 closed by @jonasz-lasut in #297
- chore(deps): update rust by @renovate[bot] in #254
- function-oci: the process contract is oci@0.1 by @jonasz-lasut in #298
- e2e: pin the republished oci-go example by @jonasz-lasut in #299
- Releases per component, and prebuilt guestfn binaries by @jonasz-lasut in #300
- function-oci's banner, and Vale's vocabulary name by @jonasz-lasut in #301
- function-oci: the contract is a gRPC server by @jonasz-lasut in #302
- e2e: pin oci-go on the gRPC contract by @jonasz-lasut in #303
- Remove the oci-go binary committed by mistake by @jonasz-lasut in #305
- ci: lint and test the OCI build on its own by @jonasz-lasut in #304
- function-oci: a call past the deadline is the deadline by @jonasz-lasut in #306
- Split the engines and functions into crates by @jonasz-lasut in #307
- Correct the function-oci docs against a real deployment by @jonasz-lasut in #309
- function-oci: a virtio RNG, no protocol version, accurate help by @jonasz-lasut in #310
- oci-go: mark the ConfigMap ready by @jonasz-lasut in #311
- Pin the e2e suite to oci-go 0.1.1 by @jonasz-lasut in #313
- chore(deps): update rust crate jiff to v0.2.42 by @renovate[bot] in #314
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to 041dfc2 by @renovate[bot] in #257
- chore(package): redraw the function icons by @jonasz-lasut in #315
- chore(release): keep every release branch by @jonasz-lasut in #316
- feat(wit): rename the package, add a sync world by @jonasz-lasut in #317
- feat(guestfn): add the wit update command by @jonasz-lasut in #319
- chore(release): tag through the GitHub API by @jonasz-lasut in #320
- feat(guestfn): pin WASI packages in guestfn.lock by @jonasz-lasut in #321
- feat(guests): fetch the WIT packages at build by @jonasz-lasut in #322
- chore(guestfn): refresh the scaffold pins by @jonasz-lasut in #324
- chore(deps): lock file maintenance by @renovate[bot] in #326
- chore(deps): update examples by @renovate[bot] in #325
- refactor(cli): align flag and env names by @jonasz-lasut in #327
- docs: drop the experimental banner by @jonasz-lasut in #330
- chore(release): record the tested versions by @jonasz-lasut in #329
- chore(deps): update rust crate kube to v5.1.0 by @renovate[bot] in #332
- chore(deps): update cgr.dev/chainguard/glibc-dynamic:latest docker digest to cb7aa46 by @renovate[bot] in #331
- chore(deps): update rust by @renovate[bot] in #328
- chore(release): describe changes, list merged PRs by @jonasz-lasut in #335
- chore(deps): update vale by @renovate[bot] in #334
- feat(oci): refuse root and drop capabilities by @jonasz-lasut in #333
- docs(oci): name function-oci v0.2.0 in the example by @jonasz-lasut in #336
- docs: tested versions of function-oci-v0.2.0 by @jonasz-lasut in #338
- chore(deps): update dependency errata-ai/vale to v3.27.0 by @renovate[bot] in #337
- fix(renovate): serialize requests to ziglang.org by @jonasz-lasut in #340
- chore(rust): build the rust guests on stable 1.100 by @jonasz-lasut in #339
- chore(deps): update examples by @renovate[bot] in #341
- chore(deps): lock file maintenance by @renovate[bot] in #343
- docs(wasm): name function-wasm v1.0.0 in installs by @jonasz-lasut in #344
Full changelog: function-wasm-v0.6.0...function-wasm-v1.0.0