Stream: git-wasmtime

Topic: wasmtime / PR #5220 Add Store::set_fuel and Store::fuel_r...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 07 2022 at 23:01):

coolreader18 opened PR #5220 from store-fuel_remaining-set_fuel to main:

Resolves #5109. As discussed there, adds Store::set_fuel and Store::fuel_remaining, which sets the absolute amount of fuel in the store and returns the amount of fuel remaining in the store respectively. In updating the examples and tests, I was already able to change some stuff to be nicer/express intent more clearly. (set_fuel provides more of a use for fuel_consumed! e.g. see examples/fuel.rs).

This feature doesn't have a maintainer assigned.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 17:54):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 17:54):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 08 2022 at 17:54):

fitzgen created PR review comment:

Or add_fuel, right?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 14 2022 at 18:14):

coolreader18 created PR review comment:

Ach, sorry this took so long to respond to; but no, add_fuel doesn't reset the fuel counter, that's why fuel_adj exists. add_fuel does like fuel += arg; fuel_adj += arg; so that fuel_consumed can return fuel_adj - fuel. There was a discussion somewhere I saw about concerns with fuel_adj overflowing and personally I'm skeptical of the use-case for fuel_consumed tracking across multiple add_fuels (maybe that's what the c-api requires?), but it'd be a breaking change to change that and I just wanted to provide an alternative with this.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 14 2022 at 18:14):

coolreader18 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 25 2023 at 20:44):

alexcrichton closed without merge PR #5220.


Last updated: Nov 22 2024 at 17:03 UTC