example

command
v0.0.0-...-54b22a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

gojs example

This shows how to use Wasm built by go using GOOS=js GOARCH=wasm. Notably, this uses filesystem support.

$ go run cat.go /test.txt
greet filesystem

Internally, this uses gojs, which implements the custom host functions required by Go.

Notes:

  • GOOS=js GOARCH=wasm wazero be removed after Go 1.22 is released. Please switch to GOOS=wasip1 GOARCH=wasm released in Go 1.21.
  • GOWASM=satconv,signext enables features in WebAssembly Core Specification 2.0.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL