Repository navigation
Remove HeapType::ConcreteExn from the public API - #15099
Open
alexcrichton wants to merge 2 commits into
Open
alexcrichton wants to merge 2 commits into
alexcrichton wants to merge 2 commits into
Conversation
This commit removes the `ConcreteExn` variant from the public API of Wasmtime and its `HeapType` `enum`. I brought this up earlier in bytecodealliance#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::ConcreteExn` as 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 `ConcreteExn` in 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 GC `struct` type 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 bytecodealliance#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.
Subscribe to Label Actioncc @fitzgen DetailsThis 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:
To subscribe or unsubscribe from this label, edit the |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:HeapType::ConcreteExnas one of its arguments.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.