Stream: general

Topic: What does a component correspond to in WIT?


view this post on Zulip Michael Fuller (Nov 25 2023 at 20:01):

Does an interface, world or package correspond to a single component in WIT?

(The Component Model docs do say an interface is like a component instance while a world is like a component type, but it's not clear what a component instance/type should mean.)

view this post on Zulip Alex Crichton (Nov 27 2023 at 04:02):

WIT is inherently only going to describe the interface of a component, e.g. its imports and exports. A component itself can be much more complicated with arbitrary structure internally of how it uses the imports and provides the exports. On one hand a world is the closest correspondence to a single component since it describes what a component can import and what it must export. On the other hand though this is only a description of the outer edge of a component, not the internals, which WIT can't express at this time.


Last updated: Oct 23 2024 at 20:03 UTC