Building a simple component
This section contains guides on how to build a simple WebAssembly component that implements an adder, with the following WIT interface:
package docs:adder@0.1.0;
interface add {
add: func(x: u32, y: u32) -> u32;
}
world adder {
export add;
}
Languages
This guide is implemented for various languages:
| Language |
|---|
| C/C++ |
| C# |
| Dart |
| Go |
| JavaScript |
| Python |
| Rust |
| TinyGo. |
| MoonBit |
| WebAssembly Text Format (WAT) |
| Other Languages |
Tip
To try a prebuilt
addercomponent without installing a language toolchain, see Pre-existing Components.