WebAssembly / wasi-threads

145 stars 8 forks source link

Define types and functions in the proposal's template #26

Closed loganek closed 1 year ago

loganek commented 1 year ago

This for now just defines types and has enigmatic documentation. The purpose of this PR is to reach agreement on type definitions:

yamt commented 1 year ago

IMO it's confusing to have a wit definition which is incompatible with README.md

i'd suggest to use a separate PRs for api/abi changes and introduction of a wit definition.

loganek commented 1 year ago

i'd suggest to use a separate PRs for api/abi changes and introduction of a wit definition.

This PR only changes WIT definitions. I don't think it's a problem for now to keep it like that; interfaces defined in README are somehow conceptual anyways, but I'm aiming to update them as well as soon as I confirm a couple of things related to WIT.

sunfishcode commented 1 year ago

Since this proposal is currently using the instance-per-thread model, Wit isn't able to correctly describe it. thread-spawn creates a new thread that implicitly captures the memory and imports of the calling thread, which is not something that Wit APIs can do. I suggest at least adding a comment about this.

yamt commented 1 year ago

which version of wit-bindgen (or other tools) can process this definition? i want to know the exact core wasm level abi corresponding to this definition.