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.
Wart
provides a number of stand-alone components:
- WasmReader reads a
Wasm
binary file into aWart
code tree representation. - WasmWriter writes a
Wart
code tree to aWasm
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 theWasm
code at native speed.
Currently known community contributions that are underway:
Wart
project implementation in Java (currently on par with Go version)Wart
project implementation in Rust