Categorygithub.com/icexin/gowasm
repositorypackage
0.0.0-20181126073040-eaf6e853b42f
Repository: https://github.com/icexin/gowasm.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

gowasm

Overview

gowasm is a go runtime implemention for WebAssembly generated by go(>=1.11) toolchain. It is also an extensible framework, you can freely add packages for the wasm module to access methods in these packages.

How to use

gowasm is just a runtime implementation, it requires a wasm vm to run the code.

There are currently two vm implementations, life and wagon.

The compilation method is as follows

$ git clone https://github.com/icexin/gowasm.git
$ cd gowasm
$ GOOS=js GOARCH=wasm go build -o /tmp/hello tests/hello.go 
$ export GO111MODULE=on

# For life vm
$ cd cmd/life && go build
$ ./life /tmp/hello wasm


# For wagon vm 
$ cd cmd/wagon && go build
$ ./wagon /tmp/hello wasm

How to custom package