Module 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§

host_function
Gas metering with an external host function.
mutable_global
Gas metering with a mutable global.

Structs§

ConstantCostRules
A type that implements Rules so that every instruction costs the same.

Enums§

GasMeter
Implementation details of the specific method of the gas metering.
MemoryGrowCost
Dynamic costs for memory growth.

Traits§

Backend
Under the hood part of the gas metering mechanics.
Rules
An interface that describes instruction costs.

Functions§

inject
Transforms a given module into one that tracks the gas charged during its execution.