alexcrichton requested cfallin for a review on PR #12972.
alexcrichton opened PR #12972 from alexcrichton:refactor-fact-for-memory-types to bytecodealliance:main:
This commit refactors the internals of FACT, wasmtime's component-to-component trampoline compiler, to better handle memories of different types. When FACT was originally written it had support for memory64, despite components not having support for memory64, but since then more types of memories have showed up in core wasm. For example FACT didn't handle shared memories or custom-page-sizes memories well. This commit manually updates some
memory64: boolfields/etc toty: Memoryto have a full-fledged memory type on-hand during translation. This affects how the memory is imported, for example, as well as bounds checks.Note that components do not currently support 64-bit memories, nor shared memories, nor custom-page-size memories. This refactoring is for future support of these features internally within FACT itself, but more support will be necessary to fully support these features throughout the runtime.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-core-reviewers for a review on PR #12972.
cfallin submitted PR review:
Much cleaner model here -- thanks!
cfallin added PR #12972 Prepare FACT for supporting more memory types to the merge queue.
cfallin removed PR #12972 Prepare FACT for supporting more memory types from the merge queue.
cfallin merged PR #12972.
Last updated: Apr 12 2026 at 23:10 UTC