go-wasm

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: BSD-4-Clause Imports: 2 Imported by: 0

README

Portable Gabi

Portable Gabi is a wrapper for the gabi library. It does not expose the same API as gabi does.

build to wasm

export GOOS="js"
export GOARCH="wasm"

go build main.go

run the demo js code:

export GOOS="js"
export GOARCH="wasm"

go build -o ./doc/example/main.wasm main.go

unset GOOS
unset GOARCH
cd doc/example
# install goexec once
go get -u github.com/shurcooL/goexec

goexec 'http.ListenAndServe(`:8080`, http.FileServer(http.Dir(`.`)))'

and visit http://localhost:8080

Word of warning

Go uses float64 to decode json numbers. A 9007199254740993 as int64 cannot be represented as float64...

Documentation

Rendered for js/wasm

Overview

Package portablegabi is used to wrap the gabi library into a wasm module.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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