Home

Awesome

<p><img align="right" width="130"src="https://github.com/Becavalier/TWVM/blob/master/assets/brand-300x300.png?raw=true"></p>

TWVM

TWVM is still under continuously construction, not production-ready yet!

<img alt="GitHub Actions status" src="https://github.com/Becavalier/TWVM/workflows/Build CI/badge.svg">

A tiny, lightweight, and efficient WebAssembly virtual machine.

Getting Started

Compile & Install

Please install the following softwares beforehand:

Then, run the following command to compile and install:

npm run build

How to use?

You can use the below command to invoke an exported function from a WebAssemly binary module:

# Invoke function `fib` with value 10.
twvm ./tests/modules/fibonacci.wasm -i=fib,10  # 55.

For further information, please run the below command for help:

twvm -h

Other Information

Currently, TWVM can only run standard WebAssembly binary modules with the instructions in MVP standard. Also, please make sure the module doesn't require any import objects (.e.g memory, function, table, and etc).

Install "valgrind" on MacOS according to the following articles first:

How to Install Valgrind on macOS High Sierra

Valgrind on macOS 10.14/10.15

And then, run the below command to check the memory leak of the program:

npm run memcheck

Roadmap

Copyright and License

Licensed under the MIT License.