Module wasm_instrument::gas_metering::mutable_global
source · Expand description
Gas metering with a mutable global.
Note
Not for all execution engines this method gives performance wins compared to using an external host function. See benchmarks and size overhead tests for examples of how to make measurements needed to decide which gas metering method is better for your particular case.
Warning
It is not recommended to apply stack limiter instrumentation to a module instrumented with this type of gas metering. This could lead to a massive module size bloat. This is a known issue to be fixed in upcoming versions.
Structs
Injects a mutable global variable and a local function to the module to track
current gas left.