wart

command module
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

README

WebAssembly Run-Time for Go

The Wart (WebAssembly Run-Time) project aims to provide a set of tools that support the WebAssembly v1.1 specification.

The goal of the Wart project is to provide an ecosystem of related components and tools that allows other projects to easily include a Wasm virtual machine and provide interfaces to the host system that hide away the differences between input languages that were used to generate the Wasm binary files and the language of the host system. Examples of these are memory management and/or string representation differences.

The reference implementation of the Wart project has been written in the Go language. The basic design is such that translation of the Wart project to other languages should be a trivial exercise.

The 1-to-1 translation from Go to Java showcases this property.

Contents

Wart provides a number of stand-alone components:

  • WasmReader reads a Wasm binary file into a Wart code tree representation.
  • WasmWriter writes a Wart code tree to a Wasm binary file.
  • WasmAnalyzer analyzes a Wart code tree for any inconsistencies and prepares the tree for execution.
  • WasmTester runs tests specified by .json files on specific Wasm code.
  • WatWriter writes a Wart code tree as a .wat WebAssembly text file.

Current implementation already has the new multi-valued returns but to be really useful still needs to implement WASI (System Interface) and WAIT (Interface Types)

Future envisioned components are:

  • WatReader that can read a .wat WebAssembly text file back into a Wart code tree representation.
  • WastReader that can read and execute .wast WebAssembly Test text files.
  • WasmCompiler that can generate LLVM code from the Wart code tree and will allow running the Wasm code at native speed.

Contributing

Currently known community contributions that are underway:

  • Wart project implementation in Java (currently on par with Go version)
  • Wart project implementation in Rust

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
server.go
server.go
wasm
consts/desc
Package desc contains Wasm import/export type descriptor values.
Package desc contains Wasm import/export type descriptor values.
consts/op
Package op contains Wasm instruction opcode values.
Package op contains Wasm instruction opcode values.
consts/sec
Package desc contains Wasm section id values.
Package desc contains Wasm section id values.
consts/value
Package value contains Wasm data type values.
Package value contains Wasm data type values.
executors
Package executor contains the executors that perform a specific action on the Wasm code tree (Module) that they operate on.
Package executor contains the executors that perform a specific action on the Wasm code tree (Module) that they operate on.
executors/context
Package context contains the context objects for the executors that perform a specific action on the Wasm code tree (Module) that they operate on.
Package context contains the context objects for the executors that perform a specific action on the Wasm code tree (Module) that they operate on.
executors/context/test
Package test contains all the extra POGO that are needed to read the tests.json file that is processed by the WasmTester executor.
Package test contains all the extra POGO that are needed to read the tests.json file that is processed by the WasmTester executor.
instructions
Package instruction contains the handlers for specific groups of instructions.
Package instruction contains the handlers for specific groups of instructions.
sections
Package wasm contains all the Plain Old Go Objects (POGO) that make up the module tree.
Package wasm contains all the Plain Old Go Objects (POGO) that make up the module tree.

Jump to

Keyboard shortcuts

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