wit-bindgen icon indicating copy to clipboard operation
wit-bindgen copied to clipboard

Wit-bindgen support for value imports and value exports

Open kulakowski-wasm opened this issue 2 years ago • 2 comments

kulakowski-wasm avatar Jun 24 '22 23:06 kulakowski-wasm

I think the mechanism for complex (e.g. allocation-requiring) value imports will need to be discussed and rendered in the component model Canonical ABI before it can be implemented here. Particularly, this should address the initialization ordering of value imports, and what the realloc function called during lowering may assume has already been initialized.

esoterra avatar Jun 30 '22 19:06 esoterra

https://github.com/WebAssembly/component-model/pull/71/ describes a specific ABI for value imports and exports.

sunfishcode avatar Jul 26 '22 22:07 sunfishcode

I'm going to close this for now since given the discussion on https://github.com/WebAssembly/component-model/issues/100 the conclusion seems to be that values/start/etc should be postponed to a later date when other aspects are more fleshed out in the component model. To that end I think that short-to-mid-term designs should assume that value imports/exports and the start function are not going to be implemented and not supported.

In the near-to-mid-term my hope is that wit-bindgen can be aligned with the component model as specified so I don't believe that this is going to make the cut since it can't be implemented in Wasmtime at the host level yet due to spec/architectural issues.

alexcrichton avatar Sep 14 '22 16:09 alexcrichton