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

Wit-bindgen support for zero-level exports

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

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

What is a zero-level export?

esoterra avatar Jun 30 '22 19:06 esoterra

It isn't in the component-model repo yet, but the idea is that it's an anonymous export. In a component that only exports one thing, it avoids the need to name it. And a component with a zero-level export wouldn't be able to have any other non-zero-level exports, so it'd be a way to encode "this component only exports this one thing".

sunfishcode avatar Jun 30 '22 21:06 sunfishcode

We opened this issue because we were considering having preview2 depend on this idea, but decided not to in the end. Future discussion of zero-level exports will happen in the component model repo.

kulakowski-wasm avatar Oct 03 '22 19:10 kulakowski-wasm