Files
wazero/imports/go
Crypt Keeper 8918d73020 ci: supports building with Go 1.20 and raises floor version to 1.18 (#1096)
This moves our floor version to the same we'll release 1.0 with: 1.18.
This is congruent with our version policy which is current-2.

Fixes #921

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-02-06 17:29:08 +02:00
..
2023-01-10 14:11:46 +09:00

Overview

When GOOS=js and GOARCH=wasm, Go's compiler targets WebAssembly Binary format (%.wasm).

Wazero's "github.com/tetratelabs/wazero/imports/go" package allows you to run a %.wasm file compiled by Go. This is similar to what is implemented in wasm_exec.js. See https://wazero.io/languages/go/ for more.

Example

wazero includes an example that makes HTTP client requests.

Experimental

Go defines js "EXPERIMENTAL... exempt from the Go compatibility promise." Accordingly, wazero cannot guarantee this will work from release to release, or that usage will be relatively free of bugs. Due to this and the relatively high implementation overhead, most will choose TinyGo instead.