Skip to content

一个有解释器和JIT编译器的WebAssembly运行时

Notifications You must be signed in to change notification settings

weizhiao/webassembly-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebAssembly Runtime

一个有解释器和JIT编译器的WebAssembly运行时,支持WASI(WASI来源于wamr)注:目前JIT编译器仍存在bug,在运行某些wasm程序时会出错

目录结构

build-scripts:保存构建llvmpython脚本和运行时本身的构建文件runtime_lib.cmake
product:在linux上运行的运行时
runtime:运行时本身。runtime/interperter——解释器,runtime/jit——jit编译器

如何配置JIT编译器

build_llvm.py脚本会下载并构建llvm 16.0.3版本,该版本是运行时中JIT使用的llvm版本。

cd build-scripts  
python3 ./build_llvm.py

之后修改product/linux/config.cmake文件,将RUNTIME_BUILD_JIT设为1

set (RUNTIME_BUILD_JIT 1)

构建方式

mkdir -p build
cd build  
cmake ..  
make  

如何使用

$ ./runtime printf.wasm
Hello, world!

About

一个有解释器和JIT编译器的WebAssembly运行时

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages