WebAssembly / WASI

WebAssembly System Interface
Other
4.72k stars 240 forks source link

preview2 questions #503

Closed yamt closed 1 year ago

yamt commented 1 year ago

will preview2 require a component-model aware runtime? (to me it looks like "yes")

if yes, will there be no way to use wasi without component-model?

asking because, for some use cases of wasi, component-model looks very heavy-weight to me. (both of implementation cost and runtime cost)

sbc100 commented 1 year ago

My understanding is that the answer is no, since the component model types have canonical mappings to MVP wasm types, and so even though WASI modules conform to the requirements of the component model the are (or can be) simple MVP wasm module, and the output of wasi-sdk will still be normal/MVP wasm modules (at least for now).

yamt commented 1 year ago

do you mean, a runtime can still choose to implement the canonical mappings, which is a static plain core wasm abi, directly w/o knowing component-model/interface-types?

sbc100 commented 1 year ago

Yes that is my understanding. @sunfishcode can confirm perhaps?

sunfishcode commented 1 year ago

Yes.

sunfishcode commented 1 year ago

And to be sure, my "yes" here was in response to sbc100's question. The component model defines a canonical ABI which is a core-wasm ABI. If there are any further questions, please file new issues!