bytecodealliance / wasm-micro-runtime

WebAssembly Micro Runtime (WAMR)
Apache License 2.0
4.98k stars 628 forks source link

support for gas metering #2163

Open rockwotj opened 1 year ago

rockwotj commented 1 year ago

Other Wasm runtimes have support for gas metering or fuel that allow Wasm code to have an upper bound on computation. Wasmtime's implementation even supports yielding. It'd be great to have this support in wamr

https://docs.rs/wasmtime/latest/wasmtime/struct.Config.html#method.consume_fuel

PhaniKb commented 8 months ago

This would be a really nice feature to have.