alexcrichton opened PR #15099 from alexcrichton:remove-concrete-exn-in-api to bytecodealliance:main:
This commit removes the
ConcreteExnvariant from the public API of Wasmtime and itsHeapTypeenum. I brought this up earlier in #14011 which was closed, but I'd like to push on this again at least from the angle of the public API of Wasmtime. Specifically this fixes a possible unusual situation where:
- A host function is created with
HeapType::ConcreteExnas one of its arguments.- This function is called with a different kind of concrete exception.
- Due to a missing type check which in theory shouldn't actually be necessary, this actually passes at runtime.
There's no panic/etc here and this is just a weird situation, but this exposes a part of exposing
ConcreteExnin the public API which is that it affects not just what's read from WebAssembly but what's also passed back in from the host. For example creating a GCstructtype with concrete exception types doesn't really make sense, but it's possible with today's embedder API.This change is not as invasive as #14011 and only limits the public API surface area of Wasmtime. The goal is to have the public API faithfully reflect wasm's type system to avoid introducing our own abstractions and having to reconcile that.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested cfallin for a review on PR #15099.
alexcrichton removed the review request for wasmtime-core-reviewers from PR #15099.
alexcrichton requested wasmtime-core-reviewers for a review on PR #15099.
alexcrichton updated PR #15099.
github-actions[bot] added the label wasmtime:api on PR #15099.
github-actions[bot] added the label wasmtime:c-api on PR #15099.
github-actions[bot] added the label wasmtime:ref-types on PR #15099.
github-actions[bot] commented on PR #15099:
Subscribe to Label Action
cc @fitzgen
<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:c-api", "wasmtime:ref-types"Thus the following users have been cc'd because of the following labels:
- fitzgen: wasmtime:ref-types
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
:thumbs_up: cfallin submitted PR review:
Happy that this worked out -- thanks for the cleanup!
cfallin added PR #15099 Remove HeapType::ConcreteExn from the public API to the merge queue.
github-merge-queue[bot] removed PR #15099 Remove HeapType::ConcreteExn from the public API from the merge queue.
alexcrichton added PR #15099 Remove HeapType::ConcreteExn from the public API to the merge queue.
:check: alexcrichton merged PR #15099.
alexcrichton removed PR #15099 Remove HeapType::ConcreteExn from the public API from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC