-
Notifications
You must be signed in to change notification settings - Fork 89
Timeline for the Component Model and async questions #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
With WASI Preview 2 we already have a pretty good island of stability in that, even as we progress to Preview 3 and 1.0 after that, we'll keep Preview 2 components working (either by supporting both simultaneously or creating tools (analogous to the preview1 component adapter used by wit-component) that can automatically convert a Preview 2 component into a Preview 3 or 1.0 component. That being said, we have a ways to go before reaching a stable standard "WASI 1.0" (entailing a Component Model 1.0). @pchickey had a good presentation at the last WASI meeting about the plan to work toward WASI 0.3 over the next year in parallel with incrementally improving WASI 0.2 via minor 0.2.* releases. Once we hit 0.3, then we can consider the final additions to make a complete MVP "1.0" release. In the meantime, we're not really blocking on native browser support because we have a fantastic polyfill in
Yes, it's definitely a goal for
Yep! Today, we'd polyfill it via Binaryen's asyncify, which has non-trivial runtime and size overhead and with native JSPI in browsers, we'd be able to avoid that overhead. If you want to see more the sketch of async, see these slides presented recently. I'll also try to give a somewhat shorter and higher-level overview next week at Wasm I/O. |
Thanks for the many great resources! So the Component Model is a subproject of WASI and tied to its versioning, at least up to 1.0.
IIUC that transpiles the whole component into JS, instead of transpiling into a core WASM module and a JS shim for the component model interaction. Isn't that giving up some of the benefits of WebAssembly? Also, is the WASI shim in What will the migration path be from wasm:io pollable to the async Component Model types? How should I design an async WASI API today for future compatibility? |
For now, yes, to minimize the number of moving pieces and possible version mismatches, we're lumping the C-M and WASI together under one monolithic version. In terms of their eventual specifications, the Component Model would get its own spec and has already been included as a future deliverable in the official WebAssembly WG Charter. WASI has farther to go to get scoped and chartered, but it would be one or multiple separate specification documents.
I don't believe so (at least, not in default builds); I think it does in fact produce one or more core
With Preview 3, the goal is for |
Ok, the calling of Will C/C++ component support be included in the WASI SDK? Or will there be a separate project for that? Is there a way to use C/C++ components today? |
There is low-level (rather verbose, mostly meant to be used to build other things) C bindings in wit-bindgen now, and iiuc, recent work here to add higher-level, safer bindings using C++. |
Great, I haven't found the C support since it's not listed in the Component Model docs, maybe worth listing C even if it's low-level and verbose, (as frankly most C APIs are anyways, so it shouldn't take much getting used to if you know C), and I also found TinyGo in the Readme. I wanted to add Lua as a language for the Component Model, which requires C with Component Model support. I think that were all questions I have for now, Thanks again. |
Is there a timeline for when the Component Model will reach stability, and for when browsers will start supporting it?
And would it be possible to polyfill the async support with the existing JS Promise integration, in case WASM runtimes are faster to implement it that browser engines?
Will the async model allow for pausing execution inside a component, e.g. to return control back to the browser event loop without having to return out of the component?
The text was updated successfully, but these errors were encountered: