rockwotj edited PR #7240:
Add a simpler interface to reset the amount of fuel in a store.
Fixes: https://github.com/bytecodealliance/wasmtime/issues/5109
A continuation of https://github.com/bytecodealliance/wasmtime/pull/5220, which has stalled.
rockwotj edited PR #7240:
Add a simpler interface to reset the amount of fuel in a store.
Fixes: https://github.com/bytecodealliance/wasmtime/issues/5109
A continuation of https://github.com/bytecodealliance/wasmtime/pull/5220, which has stalled. To make it more obvious that
consumed_fuel
is reset, I've changed the name to this method to bereset_fuel
.
fitzgen created PR review comment:
Ah yeah I see that it is copy-pasted. Mind removing this paragraph here and in the other place?
If you want to go above and beyond, you could replace it with a bit about how one might configure execution to trap or async yield on out of fuel via https://docs.rs/wasmtime/latest/wasmtime/struct.Store.html#method.out_of_fuel_async_yield and https://docs.rs/wasmtime/latest/wasmtime/struct.Store.html#method.out_of_fuel_trap
fitzgen submitted PR review:
Thanks! Just one documentation nitpick below to be addressed and then we can merge this.
fitzgen submitted PR review:
Thanks! Just one documentation nitpick below to be addressed and then we can merge this.
fitzgen created PR review comment:
Is this just copy-pasted? Because with the Rust API you can yield on out-of-fuel and I thought that the C API supported async as well now, but I am not sure if the fuel bits for that are connected or not.
rockwotj updated PR #7240.
rockwotj submitted PR review.
rockwotj created PR review comment:
Done! Thanks for catching :)
rockwotj requested fitzgen for a review on PR #7240.
fitzgen submitted PR review:
LGTM! We can land this in the meantime as the details in that other issue are hashed out.
fitzgen merged PR #7240.
Last updated: Dec 23 2024 at 12:05 UTC