You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.
There are many apis that return values asynchronously. The browser is obviously a prime suspect, but many native apis could be simplified with a promise/future-like abstraction.
For example, WebGPU uses promises quite liberally and to use it efficiently through wasm (for example, if one was to add it as an extension to wasi), promises would have to be a well-defined with respect to interface types.
Callbacks are an obvious shoo-in. A poll-like api that's abi-specific is another option. (wasi's poll_oneoff for example).
The text was updated successfully, but these errors were encountered:
Handling callbacks (sic) is an explicit aim of the interface types proposal.
At the moment, there is no specific plans to specifically support promises; we imagine that there may be additional lifting needed for higher-level concepts.
We've frequently come up against needing some sort of promise/future type in wasi, for both better web platform integration, and in order to make existing functions like poll_oneoff extensible by other wasi interfaces. There's been some informal discussions of various designs, we haven't had time to prototype solutions to it yet. If you'd like to help with this in the context of wasi, lets talk!
I think so far most of the discussion was in person or on zooms between fastly and mozilla folks, but we all hang out in the bytecodealliance zulip these days
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are many apis that return values asynchronously. The browser is obviously a prime suspect, but many native apis could be simplified with a promise/future-like abstraction.
For example, WebGPU uses promises quite liberally and to use it efficiently through wasm (for example, if one was to add it as an extension to wasi), promises would have to be a well-defined with respect to interface types.
Callbacks are an obvious shoo-in. A poll-like api that's abi-specific is another option. (wasi's
poll_oneoff
for example).The text was updated successfully, but these errors were encountered: