Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 1.92 KB

README_en.md

File metadata and controls

73 lines (46 loc) · 1.92 KB

WasmVM

A standalone WebAssembly process virtual machine

正體中文

Prerequisite

  • CMake >= 2.6

  • C++ compiler supporting c++11 standard with Standard Library

Developer Tool - SkyPat Prerequisite

Ubuntu/Debian Users

$ sudo apt-get update
$ sudo apt-get install wget automake autoconf libtool build-essential 

Ubuntu/Debian Developers

$ sudo apt-get update
$ sudo apt-get install wget automake autoconf libtool build-essential cppcheck astyle colordiff

Fedora/CentOS Users

$ sudo yum install wget automake autoconf libtool make automake gcc gcc-c++
$ sudo yum install kernel-devel 

Notice

  1. Our System call module is for Linux only.

  You can disable it in USE_SYSCALL cmake configuration if you're running Wasm without syscall module in other operating system.

  1. This project uses "Taiwan Traditional Chinese" as primary, English as secondary language in documents.

Other languages (Ex: Simplified Chinese) are only used as references or translations.

  1. Developers need to pay attention to the format specification of the original code (according to K&R style) through AStyle. Run instruction: astyle --style=kr --indent=spaces=4 --indent-switches --suffix=none --recursive *.c *.h *.hpp to format the code

Build

  1. Run CMake
mkdir build && cd build && cmake ..
  1. Run Make
make -j4

Run

  1. Prepare your WebAssembly binary file postfixed with .wasm

    You can convert text format with wabt or wat2wasm online.

  2. Run WasmVM

./WasmVM \<Filename of main module file\>

The imported module will be searched in the same directory of main module.

If you want to load more module, just append those modules by space-separated list after your command.