alexcrichton opened PR #15030 from alexcrichton:charge-more-hostcall-fuel to bytecodealliance:main:
This commit plugs a few minor holes which were otherwise unaccounted for in terms of copying data between guests. FACT adapters transcode strings on the host, but this means that there's no accounting for the size of the string being copied. No host allocations are done but the time spent copying is otherwise unaccounted for by any other metric. As host-performed work for a guest this commit uses the "hostcall fuel" metric as a gauge for how much work can be done in this situation.
This then also handles direct component-to-component streams which use
memcpyto transfer bytes. Again nothing is allocated but this work performed on the host is otherwise unmetered. The hostcall fuel is additionally applied here.The general thinking is that hostcall fuel already limits and meters guest<->host interactions, so it should naturally extend to work the host performs on behalf of guests. I'll note that epoch handling naturally falls out of the adapter already, and normal wasm fuel integration isn't hooked up into this just yet but that's a separable issue.
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested cfallin for a review on PR #15030.
alexcrichton removed the review request for wasmtime-compiler-reviewers from PR #15030.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #15030.
alexcrichton requested wasmtime-core-reviewers for a review on PR #15030.
:thumbs_up: fitzgen submitted PR review.
fitzgen added PR #15030 Consume hostcall fuel in FACT adapters & streams to the merge queue.
:check: fitzgen merged PR #15030.
fitzgen removed PR #15030 Consume hostcall fuel in FACT adapters & streams from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC