Skip to content

Improve type imports into components#5777

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-component-import-types
Feb 14, 2023
Merged

Improve type imports into components#5777
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-component-import-types

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit fixes a panic related to type imports where an import of a type didn't correctly declare the new type index on the Wasmtime side of things. Additionally this plumbs more support throughout Wasmtime to support type imports, namely that they do not need to be supplied through a Linker. This additionally implements a feature where empty instances, even transitively, do not need to be supplied by a Wasmtime embedder. This means that instances which only have types, for example, do not need to be supplied into a Linker since no runtime information for them is required anyway.

Closes #5775

This commit fixes a panic related to type imports where an import of a
type didn't correctly declare the new type index on the Wasmtime side of
things. Additionally this plumbs more support throughout Wasmtime to
support type imports, namely that they do not need to be supplied
through a `Linker`. This additionally implements a feature where empty
instances, even transitively, do not need to be supplied by a Wasmtime
embedder. This means that instances which only have types, for example,
do not need to be supplied into a `Linker` since no runtime information
for them is required anyway.

Closes bytecodealliance#5775
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton merged commit b5e9fb7 into bytecodealliance:main Feb 14, 2023
@alexcrichton alexcrichton deleted the fix-component-import-types branch February 14, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panicked: thread 'main' panicked at 'index out of bounds: the len is 7 but the index is 7'

2 participants