Stream: wasi

Topic: WASI Preview2


view this post on Zulip Dan Gohman (May 25 2022 at 16:00):

I'm starting work on a project I'm calling WASI Preview2, which I hope will become a major update to WASI.

view this post on Zulip Dan Gohman (May 25 2022 at 16:00):

The biggest change is to move from witx to wit, and use wit-bindgen, and to build up wasi-libc/wasi-sdk/rust wasi support on top of that.

view this post on Zulip Dan Gohman (Jun 25 2022 at 00:00):

The meeting info for the WASI Preview2 presentation is here.

WebAssembly meetings (VC or in-person), agendas, and notes - meetings/WASI-06-30.md at main · WebAssembly/meetings

view this post on Zulip Bailey Hayes (Jun 27 2022 at 18:38):

Will there be a ppt or slide deck?

view this post on Zulip Dan Gohman (Jun 27 2022 at 18:40):

The slides aren't quite finished yet, but I definitely do plan to add the slides to the meeting notes.

view this post on Zulip Dan Gohman (Jun 30 2022 at 17:50):

PR to add the slides to the meeting notes is here: https://github.com/WebAssembly/meetings/pull/1066

WebAssembly meetings (VC or in-person), agendas, and notes - Add the slides for the WASI Preview2 presentation. by sunfishcode · Pull Request #1066 · WebAssembly/meetings

view this post on Zulip bjorn3 (Jun 30 2022 at 19:04):

I think a readyness based stream api makes more sense from a determinism, safety and predictability based perspective. The api you suggested allows writing at any point between a read/write and a wait. This is less deterministic as you have to know the exact instruction at whicj the write happened to replay it. It makes it easier to accidentally deallocate a buffer which is still registered as read/write target and it makes it harder for someone trying to read the code to know if some data doesn't get overwritten by a read operation.

view this post on Zulip Dan Gohman (Jun 30 2022 at 19:15):

You're correct, the API presented there has the data arriving in the buffer at nondeterministic times. And the user has to keep it allocated and immobile while a read or write is in flight.

view this post on Zulip Dan Gohman (Jun 30 2022 at 19:17):

My understanding is that the main idea here is that the low-level stream details here would be hidden in a source language's async runtime.

view this post on Zulip Dan Gohman (Jun 30 2022 at 19:19):

I should mention that this stream design is part of the component model, and my presentation here is just showing what it would look like in the core-wasm ABI implemented by engines.

view this post on Zulip bjorn3 (Jun 30 2022 at 19:23):

How would for example tokio be able to abstract over it without forcing a copy?

view this post on Zulip Dan Gohman (Jun 30 2022 at 19:26):

I myself don't know the plan for that right now. But I do know that this design is being developed in close cooperation with people who have deep Rust async experience.


Last updated: Dec 23 2024 at 13:07 UTC