Skip to content

Accounting for component conversion work in an execution fuel budget #14430

Description

@wilfreddenton

I run Wasmtime components in an embedding where guest instructions and host work share an execution fuel budget. Guest-to-host lifting consumes hostcall_fuel, but that allowance starts over for each lift and does not reduce Store::get_fuel(). I need repeated conversions to count against the execution budget, including work done before a conversion fails.

I can see two possible approaches:

  1. Wasmtime could optionally charge Store fuel as lifting consumes its existing allowance, at a configurable price.
  2. Wasmtime could expose allowance consumption, including partial consumption on errors, and provide reliable points for the embedding to set a limit from remaining fuel before each lift and settle the cost before execution continues. A hook might help, but I am not sure the current hooks cover all those points.

Would you recommend either approach, or a different API for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions