Rather than clutter both the README and home page with details that can drift and have caused maintenance, this directs users to the tested basic example. This also adds a FAQ entry about TinyGo's main, thanks to @basvanbeek for the help. Signed-off-by: Adrian Cole <adrian@tetrate.io>
11 lines
228 B
Go
11 lines
228 B
Go
package main
|
|
|
|
//export add
|
|
func add(x, y uint32) uint32 {
|
|
return x + y
|
|
}
|
|
|
|
// main is required for the `wasi` target, even if it isn't used.
|
|
// See https://wazero.io/languages/tinygo/#why-do-i-have-to-define-main
|
|
func main() {}
|