A tiny, lightweight, and efficient WebAssembly virtual machine.
Please install the following softwares beforehand:
Then, run the following command to compile and install:
npm run build
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
- Limitations:
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).
- Memory Check:
Install "valgrind" on MacOS according to the following articles first:
How to Install Valgrind on macOS High Sierra
And then, run the below command to check the memory leak of the program:
npm run memcheck
- Architecture refactoring.
- Run simple fibonacci function successfully.
- Full Wasm spec version 1.0 support.
- Pass all basic testcases.
- DCT optimization.
- WAT support.
Licensed under the MIT License.