An open API service indexing awesome lists of open source software.

https://github.com/icexin/gowasm

gowasm is a go runtime implemention for WebAssembly generated by go(>=1.11) toolchain.
https://github.com/icexin/gowasm

go wasm webassembly

Last synced: 4 months ago
JSON representation

gowasm is a go runtime implemention for WebAssembly generated by go(>=1.11) toolchain.

Awesome Lists containing this project

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](https://github.perlin-network/life) and [wagon](https://github.com/go-interpreter/wagon).

The compilation method is as follows

``` bash
$ 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
=====================