UWASM-VM repository include a few parts:
- UWASM VM: an interpreter, can load and run uwm format file
- encoder: a library, create uwm file, and write content
- u_sld: a uwm file editor, merge uwm file and so file
- wasm_to_uwasm: a convertor, can convert wasm file to uwm file
All source code under src
direcroty.
Documents are available in doc
dir.
| OS | bit length | | :---: | :--: | :--: | | Linux | 32 bit | | Linux | 64 bit | | OSX | 64 bit |
- Common build phase
cd uwasm-vm
mkdir build
cd build
cmake ..
make
make install
- Specific build type
# build debug version
cmake .. -DCMAKE_BUILD_TYPE=Debug
# build release version
cmake .. -DCMAKE_BUILD_TYPE=Release
- Specific install prefix
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
- Specific extra cflags or cxxflags
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TARGET=uvm-m32
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TARGET=uvm-m32
- Build part of components
# uvm: intepreter
make uvm
# uvm_encoder: encoder
make encoder
# u_sld: uwm editor
make u_sld
# wasm_to_uwasm: wasm to uwasm convertor
make wasm_to_uwasm
- build
libffi
git clone https://github.com/libffi/libffi.git
cd libffi
mkdir build install
./autogen.sh
cd build
../configure --prefix=/abs/path/libffi/install
make
make install
# build debug version
../configure --prefix=/abs/path/libffi/install --enable-debug
# build 32 bit version
../configure --prefix=/abs/path/libffi/install CFLAGS="-m32" CXXFLAGS="-m32"
- build
gtest
git clone https://github.com/google/googletest.git
cd googletest
mkdir build install
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Release
make
make install
#build debug version
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Debug
# build 32 bit version
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"
- build
elfio
git clone https://github.com/serge1/ELFIO.git
cd ELFIO
# just copy the elfio folder to include directory