I'll be integrating some WASM runtime in my project to let users write plugins for my project. However those plugins may potentially be faulty and hang, so I need some way of interrupting their code execution. One way to go about this that I've seen in other wasm runtimes is via support for metering. You can specify a maximum amount of fuel that code can use for running, and if the fuel is exhausted the execution causes a wasm trap, which then ends up as a Result in Rust. It would be nice to see some kind of support for this use case (if it doesn't already exist in some way).
I'll be integrating some WASM runtime in my project to let users write plugins for my project. However those plugins may potentially be faulty and hang, so I need some way of interrupting their code execution. One way to go about this that I've seen in other wasm runtimes is via support for metering. You can specify a maximum amount of fuel that code can use for running, and if the fuel is exhausted the execution causes a wasm trap, which then ends up as a Result in Rust. It would be nice to see some kind of support for this use case (if it doesn't already exist in some way).