#[no_mangle]
pub extern "C" fn wasmer_metering_new(
    initial_limit: u64,
    cost_function: wasmer_metering_cost_function_t
) -> Box<wasmer_metering_t>
Expand description

Creates a new metering middleware with an initial limit, i.e. a total number of operators to execute (regarding their respective cost), in addition to a cost function. The cost function defines the cost of an operation, that will decrease the initial limit.

Example

See module’s documentation.