Stream: git-wasmtime

Topic: wasmtime / PR #3794 implement `--add-fuel` option for `wa...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 11 2022 at 21:54):

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:

  1. adding a fuel_amount u64 field to the Tunables struct with a default
    value of 0.

  2. adding a Config::fuel_amount method, which sets fuel_amount on it's
    tunables field.

  3. updating Store::new to call StoreOpaque::add_fuel if consume_fuel is
    true.

The fuel examples to use the new Config::fuel_amount instead of calling
Store::add_fuel directly

I'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

view this post on Zulip Wasmtime GitHub notifications bot (Feb 11 2022 at 21:54):

JakeChampion closed without merge PR #3794.


Last updated: Nov 22 2024 at 16:03 UTC