Stream: git-wasmtime

Topic: wasmtime / PR #11324 Package component model options in a...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:54):

alexcrichton opened PR #11324 from alexcrichton:intern-options to bytecodealliance:main:

This commit is a refactoring of how canonical ABI options are handled during compilation and runtime. Previously options were "exploded" meaning that options were all passed around as parameters but this was a bummer for a few reasons:

To solve these two problems options are now intern'd at compile time to an OptionsIndex, a 32-bit value. This is stored as a new table in component metadata and consulted at runtime. This means that OptionsIndex can be passed around with an instance for a much safer means of threading options around. Additionally there's no need to pass around all parameters individually and instead just one parameter, OptionsIndex, need be threaded through.

This commit additionally overhauls trampoline generation for the component compiler to avoid a function-per-intrinsic and instead have a single function that all intrinsics use. I found this easier to understand and helps codify that all intrinsics are basically the same with some minor details differing between them.

The end result of this is (hopefully) a net simplification of the component compiler in addition to a large amount of removal of unsafe code in the async implementation as only safe types are passed around now instead of raw pointers.

Closes #10143
Closes #11188

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:54):

alexcrichton requested abrown for a review on PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:54):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:54):

alexcrichton requested fitzgen for a review on PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:54):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 17:56):

alexcrichton updated PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 18:59):

alexcrichton updated PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 18:59):

fitzgen submitted PR review:

LGTM!

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 18:59):

fitzgen has enabled auto merge for PR #11324.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 19:36):

fitzgen merged PR #11324.


Last updated: Dec 06 2025 at 06:05 UTC