Stream: git-wasmtime

Topic: wasmtime / PR #15104 Optionally charge lifted hostcall fu...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2026 at 22:30):

RajaBabu15 opened PR #15104 from RajaBabu15:hostcall-fuel-store-fuel to bytecodealliance:main:

Closes #14430

Implements the approach agreed in the issue: optionally charge Store fuel for the work done while lifting guest values into the host, at LiftContext::consume_fuel.

Tests:

Open questions:

  1. Naming, and whether this belongs on Store (next to set_hostcall_fuel) or on Config.
  2. The setter is currently a silent no-op without Config::consume_fuel; should it return an error like set_fuel does?
  3. If one charge is larger than the active fuel window, the remaining fuel is redistributed, which restarts the async-yield countdown. Is that acceptable, or should it leave the counter positive so the next wasm fuel check handles it?

:robot: Generated with Claude Code

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2026 at 22:30):

RajaBabu15 requested fitzgen for a review on PR #15104.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2026 at 22:30):

RajaBabu15 removed the review request for wasmtime-core-reviewers from PR #15104.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 31 2026 at 22:30):

RajaBabu15 requested wasmtime-core-reviewers for a review on PR #15104.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 01 2026 at 00:54):

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

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2026 at 17:23):

fitzgen commented on PR #15104:

This PR appears to be in violation of our AI tool policy. If you do not believe that is true, you may state your case.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 17:37):

RajaBabu15 commented on PR #15104:

You're right. I opened this before I understood the fuel accounting well enough to defend it. I'm closing it and will return with something smaller that I can fully explain.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 17:37):

:cross_mark: RajaBabu15 closed without merge PR #15104.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 04 2026 at 17:41):

RajaBabu15 edited PR #15104:

Closes #14430

Implements the approach agreed in the issue: optionally charge Store fuel for the work done while lifting guest values into the host, at LiftContext::consume_fuel.

Tests:

Open questions:

  1. Naming, and whether this belongs on Store (next to set_hostcall_fuel) or on Config.
  2. The setter is currently a silent no-op without Config::consume_fuel; should it return an error like set_fuel does?
  3. If one charge is larger than the active fuel window, the remaining fuel is redistributed, which restarts the async-yield countdown. Is that acceptable, or should it leave the counter positive so the next wasm fuel check handles it?

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

RajaBabu15 edited PR #15104:

Closes #14430.
Adds an opt-in Store::set_hostcall_fuel_consumes_store_fuel, so lifting guest values also consumes Wasm fuel.
It is off by default and needs Config::consume_fuel; lowering is not charged.
Fuel is charged before the copy; running out consumes the rest and traps with OutOfFuel.
Tests cover the flag off, on, on with too little fuel, and without engine fuel.

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

RajaBabu15 edited a comment on PR #15104:

Closing this: I opened it before I understood the fuel accounting well enough to defend it. I will come back with something smaller that I can explain.


Last updated: Nov 19 2026 at 20:05 UTC