JakeChampion opened PR #3794 from configure-fuel-issue-3779
to main
:
This flag is expected to be used with the
--consume-fuel
flag.The way this has been implemented is by:
adding a
fuel_amount
u64 field to theTunables
struct with a default
value of 0.adding a
Config::fuel_amount
method, which setsfuel_amount
on it's
tunables
field.updating
Store::new
to callStoreOpaque::add_fuel
ifconsume_fuel
is
true.The
fuel
examples to use the newConfig::fuel_amount
instead of calling
Store::add_fuel
directlyI've only added a test for the CLI flag and nothing else as I could not locate
tests for Tunables, Config, or Store.This should resolve https://github.com/bytecodealliance/wasmtime/issues/3779
JakeChampion closed without merge PR #3794.
Last updated: Nov 22 2024 at 16:03 UTC