Stream: general

Topic: Is there any detailed document explaining wasmtime-fiber?


view this post on Zulip Sammy (Jun 04 2024 at 02:30):

Is there any detailed document explaining wasmtime-fiber?

view this post on Zulip Pat Hickey (Jun 04 2024 at 03:08):

Not that I’m aware of. It’s a private dependency of wasmtime - it’s not intended for use by other crates.

view this post on Zulip Sammy (Jun 04 2024 at 07:22):

What's it used for? If it serves to manage corutines, why not just tokio or async-std?

view this post on Zulip Joel Dice (Jun 04 2024 at 12:11):

Tokio and async-std operate on Futures, which are essentially stackless coroutines. Fibers are stackful, i.e. each one has a dynamically sized stack, which is necessary to represent a Wasm guest's call stack. Futures are fixed-size state machines and thus not useful for that purpose.

view this post on Zulip Joel Dice (Jun 04 2024 at 12:13):

Of course, a fiber can be wrapped up in a Future (i.e. a Future can own and defer to a fiber), and that's exactly what Wasmtime does for interop with Tokio.

view this post on Zulip Alex Crichton (Jun 04 2024 at 14:50):

Do you have any particular questions about wasmtime-fiber you'd like to ask?

view this post on Zulip Sammy (Jun 05 2024 at 01:39):

Great thanks. I will post further questions after researching source codes.


Last updated: Nov 22 2024 at 17:03 UTC