Stream: git-wasmtime

Topic: wasmtime / PR #14396 Preserve resource aliases when stubb...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:15):

andreiltd opened PR #14396 from andreiltd:fix-stub-aliases to bytecodealliance:main:

I have this use case where I use wizer to initialize JS component. During the initialization JS engine requires real wasi implementation but application defined imports should trap when called and their real implementation should be provided later when the component is running.

So far I was able to achieve this by keeping the following calls order: trap first and then register wasi. That approach is not working anymore after https://github.com/bytecodealliance/wasmtime/pull/13908 and I'm getting:

instance export error has the wrong type

This fix remembers which resource has already been visited and skips placeholder for that alias. The type checker then resolv each alias to the original resource.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:15):

andreiltd requested cfallin for a review on PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:15):

andreiltd requested wasmtime-core-reviewers for a review on PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:56):

alexcrichton unassigned cfallin from PR #14396 Preserve resource aliases when stubbing unknown imports.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:56):

alexcrichton requested alexcrichton for a review on PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:59):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 14:59):

:speech_balloon: alexcrichton created PR review comment:

I believe that the code in this PR is probably correct, but I find the comment here a bit confusing -- could this be replaced with this instead?

The first definition of a resource needs to be present, but all other future references to the same resource are aliases of the original resource definition. Once a resource is visited here all future hits on the same resource shouldn't do anything else effectively. If item_name is already defined then we'll bail out in the below matches!, and otherwise a stub will be inserted, so no matter what the first resource is defined and all others willrefer to that.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 16:21):

fitzgen added the label wasm-proposal:component-model on PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 17:44):

github-actions[bot] added the label wasmtime:api on PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 18:01):

andreiltd updated PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 19:28):

alexcrichton added PR #14396 Preserve resource aliases when stubbing unknown imports to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 19:55):

:check: alexcrichton merged PR #14396.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 24 2026 at 19:55):

alexcrichton removed PR #14396 Preserve resource aliases when stubbing unknown imports from the merge queue.


Last updated: Oct 11 2026 at 04:10 UTC