Stream: git-wasmtime

Topic: wasmtime / PR #7240 Support reset_fuel in store APIs


view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:02):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:03):

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 be reset_fuel.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:49):

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

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:49):

fitzgen submitted PR review:

Thanks! Just one documentation nitpick below to be addressed and then we can merge this.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:49):

fitzgen submitted PR review:

Thanks! Just one documentation nitpick below to be addressed and then we can merge this.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 21:49):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 22:32):

rockwotj updated PR #7240.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 22:32):

rockwotj submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2023 at 22:32):

rockwotj created PR review comment:

Done! Thanks for catching :)

view this post on Zulip Wasmtime GitHub notifications bot (Oct 14 2023 at 00:04):

rockwotj requested fitzgen for a review on PR #7240.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 16 2023 at 17:39):

fitzgen submitted PR review:

LGTM! We can land this in the meantime as the details in that other issue are hashed out.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 16 2023 at 18:24):

fitzgen merged PR #7240.


Last updated: Dec 23 2024 at 12:05 UTC