go-webassembly-tutorial

module
v0.0.0-...-20c4269 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT

README

go-webassembly-tutorial

WebAssembly Calculator Demo

Build

make build

Serve

make serve

Build and serve

make build serve

Editor Config

could not import syscall/js (no package for import syscall/js)
VS Code

When using Go modules related to WebAssembly, namely syscall/js, the default settings in VS Code will trigger error reports like "Build constraints exclude all Go files" in the editor.

Preferences > Settings > Workspace > Go tools env var.

Set the following:

{
    "go.toolsEnvVars": {
        "GOOS": "js",
        "GOARCH": "wasm"
    }
}

Ctrl + Shift + P > Reload Window.

Directories

Path Synopsis
cmd
serve
A basic HTTP server.
A basic HTTP server.

Jump to

Keyboard shortcuts

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