Skip to content

Instruction metering #3927

Closed
Closed
@AlixANNERAUD

Description

@AlixANNERAUD

Feature

Similar to the Wasmer runtime, it would be beneficial to implement instruction metering, allowing control to be handed back to the caller after executing a specified number of instructions.

Benefit

This would enable on platform with a cooperative scheduler to manage how WASM code is executed, preventing system overload.

Implementation

Introduce a function like wasm_func_call_with_metering that returns an after a given number of executed instruction, a boolean indicating whether the function reached its end.

Alternatives

None identified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions