Stream: git-wasmtime

Topic: wasmtime / PR #12146 Deduplicate static/dynamic host func...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 10 2025 at 02:25):

alexcrichton opened PR #12146 from alexcrichton:refactor-component-host-functions to bytecodealliance:main:

This commit refactors the component/func/host.rs file to deduplicate the paths between static/dynamic host functions. Previously there was a significant amount of duplication between the two which has been exacerbated through time. This commit refactors the state of affairs to ensure that all the shared logic between the two is in one location and the only difference is what they're already doing different (e.g. lifting/lowering guts).

The high-level goal here was to see if this was possible, but in the end this feels like a much cleaner state of affairs than prior as far fewer details are duplicated across a few locations. The host function behavior is slightly more "dynamic" than before in the sense that statically-known signature has a few more type lookups than before, for example, but this can be fixed in due time if necessary.

<!--
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 (Dec 10 2025 at 02:25):

alexcrichton requested fitzgen for a review on PR #12146.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 10 2025 at 02:25):

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

view this post on Zulip Wasmtime GitHub notifications bot (Dec 10 2025 at 02:56):

alexcrichton updated PR #12146.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 20:20):

fitzgen submitted PR review:

LGTM, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 11 2025 at 20:44):

fitzgen merged PR #12146.


Last updated: Dec 13 2025 at 19:03 UTC