WASM: Support for setting an imported function's module name (#455)

* wasm: add support for setting a function's Wasm import module name by using the //go:wasm-module comment.
This commit is contained in:
Phil Kedy
2019-09-12 02:35:43 -04:00
committed by Ron Evans
parent 1dbfc976e8
commit 55144ad608
3 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -3,7 +3,9 @@
The examples here show two different ways of using WebAssembly with TinyGo:
1. Defining and exporting functions via the `//go:export <name>` directive. See
[the export folder](./export) for an example of this.
[the export folder](./export) for an example of this. Additionally, the Wasm
module (which has a default value of `env`) can be specified using
`//go:wasm-module <module>`.
1. Defining and executing a `func main()`. This is similar to how the Go
standard library implementation works. See [the main folder](./main) for an
example of this.