Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions content/docs/guides/webassembly/wasi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ Here is a small TinyGo program for use within a WASI host application:
package main

//go:wasmimport yourmodulename add
func add(x, y uint32) uint32 {
return x + y
}
func add(x, y uint32) uint32

// main is required for the `wasip1` target, even if it isn't used.
func main() {}
```

`//go:wasmimport` may only appear on function declarations without a body (the
implementation is provided by the host).

To compile the above TinyGo program for use on any WASI runtime:

```shell
Expand Down