Module wasm_instrument::gas_metering
source · Expand description
This module is used to instrument a Wasm module with the gas metering code.
The primary public interface is the inject
function which transforms a given
module into one that charges gas for code to be executed. See function documentation for usage
and details.
Modules
Gas metering with an external host function.
Gas metering with a mutable global.
Structs
A type that implements
Rules
so that every instruction costs the same.Enums
Implementation details of the specific method of the gas metering.
Dynamic costs for memory growth.
Traits
Under the hood part of the gas metering mechanics.
An interface that describes instruction costs.
Functions
Transforms a given module into one that tracks the gas charged during its execution.