WebAssembly / WASI

WebAssembly System Interface
Other
4.71k stars 240 forks source link

[do not merge] Preview adding `@since` and `@unstable` gates to WASI 0.2 #604

Open yoshuawuyts opened 1 month ago

yoshuawuyts commented 1 month ago

In order to help create confidence in the implementation of @since and @feature in wasm-tools, this PR adds @since gates to the entirety of the WASI 0.2 API surface area. As well as bringing in the wit:clocks timezone surface area introduced in https://github.com/WebAssembly/wasi-clocks/pull/61 under an @unstable attribute.

This PR is not intended to be merged, but to mainly to validate the implementation and to give an idea of what the resulting semantics of that will be in practice.

Validating the implementation

Using a local build of the wasm-tools branch, do:

for d in $(ls preview2);
   do wasm-tools component wit "./preview2/$d";
done;

This will warn wasm-tools not knowing where to find wasi:io, but it will not throw any errors about @since or @feature gates not parsing.

Next steps

Speaking concretely about the implementation: I'll split this PR up into several sub-PRs on the correct sub-repositories. Those can't be merged until the @since and @feature gate functionality is merged - but hopefully with this draft PR we can get one step closer in building confidence that it will work out as expected.