Handwritten WASM components. The point is to learn the WASM component model https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md
Runtime host for running these components is in https://github.com/HarikrishnanBalagopal/test-wasm-components-handwritten-host
Based on this tutorial https://ifcoltransglinks.wordpress.com/2024/01/24/creating-a-webassembly-component-with-wat-and-wit/
Host for the manually written WASM component.
The wit
is generated from the addcomp.wat
file in the manual
folder.
$ wasm-tools component wit addcomp.wat
package root:component;
world root {
export length: func(input: string) -> u32;
}
To produce the WASM component binary we use
$ wasm-tools parse addcomp.wat -o addcomp.wasm