A Minimal WebAssembly interpreter written in C. Supports the WebAssembly MVP (minimum viable product) version of the WebAssembly specification.
This is a fork of the great works at kanaka/wac focuses on making the WASM Interpreter work on embedded devices compatible with Espressif ESP32 and their ESP-IDF development environment. This environment uses Amazon FreeRTOS.
Please read the intro at kanaka/wac .
Runs simple WASM code generated by Emscipten or CLANG/LLVM V8.
wac. No plans to change.
Get the ESP-IDF development kit from https://docs.espressif.com/projects/esp-idf/en/stable/index.html and follow the instructions how to download, install, and configure.
The environment variable
ESP_PLATFORM indicates we are building for ESP32:
Run once, the only thing to do is to adjust the devcie port of your module:
In the root directory
./wac, build everything:
Flash the built image and start the monitor:
make flash monitr
The output is pretty verbouse becasue tracing is enabled (change in platform.h). If everything goes fine it prints the return value, tells its done and reboots to start over. Stop the monitor with
CTRL - ].
The purpose of the Ubuntu built is to give an easier environment to track down bug, and to study the code.
Follow the instructions at kanaka/wac to install dependencies (works for me on Ubuntu 18.04. and does not work on Mac OS).
Create the out directory
Unset ESP_PLATFORM environment variable (otherwise the built will be for ESP)
Make the executable out/wac
MPL-2.0 (see LICENSE).