You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [sample `add.wit` file](https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/example-host/add.wit) exports a function. However, you'll often prefer to export an interface, either to comply with an existing specification or to capture a set of functions and types that tend to go together. For example, to implement the following world:
127
+
While it is possible to export a raw function, prefer exporting an interface, similar to the [sample `adder` world][add-wit].
128
+
This often makes it easier to comply with an existing specification or to capture a set of functions and types
129
+
that tend to go together.
130
+
131
+
For example, consider the following changes to the `add` interface in the `adder` world:
0 commit comments