Skip to content

Modularize the WASI API.#98

Merged
sunfishcode merged 2 commits intoWebAssembly:masterfrom
sunfishcode:modularize
Dec 3, 2019
Merged

Modularize the WASI API.#98
sunfishcode merged 2 commits intoWebAssembly:masterfrom
sunfishcode:modularize

Conversation

@sunfishcode
Copy link
Copy Markdown
Member

This splits what was once wasi_unstable into separate modules. There's
a lot of API evolution still to be done here, and the groupings
presented here may change, but this should help get things started.

This is currently a draft PR not yet suitable to merge, but suitable to discuss :-).

This splits what was previously "preview" into separate modules.
There's a lot of API evolution still to be done here, and the
groupings presented here may change, but this should help get
things started.
@sunfishcode sunfishcode marked this pull request as ready for review November 28, 2019 00:31
@sunfishcode
Copy link
Copy Markdown
Member Author

Ok, this is now updated and rebased, and I believe it's ready to go.

@leonwanghui
Copy link
Copy Markdown
Contributor

@sunfishcode I think it's a great work, but I have a little quesition that how can we update the minimal code if we update the tag from emphemeral to snapshot. From the current change, it would take a lot of modification.

@sunfishcode
Copy link
Copy Markdown
Member Author

@leonwanghui For most users of WASI, the answer is to avoid calling WASI APIs directly, and use WASI libc, Rust's libstd, AssemblyScript, or other toolchains that provide stable and higher-level APIs on top of it. For maintainers of these toolchains, and for maintainers of WASI implementations, using witx generators to generate boilerplate code can reduce the amount of work you need to do when the API changes.

That said, I recognize that this PR will likely still require a lot of work for some people. I'd be interested in hearing any ideas about how we could make this easier. As a maintainer of both an implementation of WASI and of toolchains for WASI, this will be a lot of work for me too. There's been some exploration about auto-generating polyfills, for example.

Concerning this PR in particular, modularization is one of the most-requested changes in WASI, and it's a requirement for many other things we want to do, and we have consensus here, so I'm going to proceed with the change. But if there are ways we can help, please let us know!

@sunfishcode sunfishcode merged commit 14ea47a into WebAssembly:master Dec 3, 2019
@sunfishcode sunfishcode deleted the modularize branch December 3, 2019 15:38
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
Release Preview 2: set package version to 0.2.0
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
alexcrichton pushed a commit to alexcrichton/WASI that referenced this pull request Jan 29, 2026
* Update to wit-bindgen 0.36.

The main change here is that the Rust modules now include the WIT
interface documentation as documentation comments, so that they show
up in the cargo doc documentation.

* Update CI to wit-bindgen 0.36 too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants