wasm.go

module
v0.0.0-...-c1d2b53 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT

README

wasm.go

Build Status

An experimental Wasm implementation written in Go.

jaws

Features

  • binary
    • types Go structs translated from Wasm binary format (as simple and direct as possible)
    • decoder Wasm binary format decoder
    • encoder Wasm binary format encoder
  • validator Wasm binary format validator
  • interpreter Wasm interpreter
  • text (WIP) WAT & WAST compiler powered by ANTLR
  • aot (WIP) AOT (Wasm binary -> Go plugin) compiler
  • jit (WIP) JIT compiler using LLVM

Running "Hello, World!"

Interpreter mode:

$ git clone https://github.com/zxh0/wasm.go
$ cd wasm.go
$ go run github.com/zxh0/wasm.go/cmd/wasmgo hw.wat

AOT mode:

$ git clone https://github.com/zxh0/wasm.go
$ cd wasm.go
$ go run github.com/zxh0/wasm.go/cmd/wasmgo -aot hw.wat > hw.wasm.go
$ go build -buildmode=plugin -o hw.so hw.wasm.go
$ go run github.com/zxh0/wasm.go/cmd/wasmgo hw.so

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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