Stream: wasmtime

Topic: ✔ Suspend runtime instance


view this post on Zulip Sef F (Oct 30 2024 at 18:23):

Thank you @Alex Crichton. This resolves my question

view this post on Zulip Notification Bot (Oct 30 2024 at 18:24):

Sef F has marked this topic as resolved.

view this post on Zulip Alex Crichton (Oct 30 2024 at 18:25):

To help us better document this, I'm curious if there was something you searched for or places you checked to find information on this? We've gotten questions like this a few times so I'd love to make sure this is well-documented. Most of the documentation is here right now but that's not necessarily discoverable

view this post on Zulip Sef F (Oct 30 2024 at 19:05):

I looked through the wasmtime docs with words such as "suspend", "freeze", and eventually with "interrupt" stumbled onto epoch_interruption and through that the concepts of epochs and fuel but I struggled to understand them and thought they were interrupt based rather than asynchronously managed.

I think that the major difficulty with information on this front is that the features are changing and expanding a lot and will likely continue to change in terms of what's expected until WASI and WIT are finalized. Further while wasmtime can easily be described as a "wasm runtime" to conceptually understand all that it does is much harder as an end user and a mdBook detailing what wasmtime is and does would likely really help. I do however want to stress that I think this idea of a book should be done after WASI and WIT are finalized as it would be likely redundant to build on sand.

The only thing I could really recommend is example projects with an asynchronous epoch implementation as the only one that exists presently is using a trap. With a lot of these features a rudimentary example goes a long way in showing what can be done and how it works. That all having been said I'll try to make a basic example of this with tokio and submit a PR, so hopefully that could help

view this post on Zulip Alex Crichton (Oct 30 2024 at 19:14):

thanks for the feedback, this is quite useful! I'll try to see if I can't also help incorporate this into our docs


Last updated: Dec 23 2024 at 14:03 UTC