Skip to content

davnavr/wasmstint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

843 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasmstint

A stackless, in-place interpreter for WebAssembly written in Zig.

Inspired by the following projects:

Note that wasmstint is still in development and it's API is very unstable!

Supported Features

  • Fuel-metering (like all the other WASM runtimes)
  • Full control over memory allocations thanks to Zig's std.mem.Allocator API.
  • Passes specification testsuite tests (for supported WASM proposals)

WASM Proposal Support

wasmstint currently supports and passes test for WebAssembly 2.0 as well as few additional proposals:

Currently, support for all of these features is always enabled. Disabling of features at compile- time may be added in the future.

WASI support

wasmstint currently has incomplete support for wasi_snapshot_preview1 applications.

To run the WASI preview 1 interpreter, run the following command:

zig build run-wasip1 -- -m /path/to/application.wasm --dir /path/to/dir guest/name rw

Due to the way WASI sandboxing is implemented on Windows, building the WASI interpreter requires targeting at least Windows 10 version 1607 or higher.

zig build run-wasip1 -Dtarget=x86_64-windows.win10_rs1

Building

Run zig build --help for more information.

wasmstint is currently only known to build and run its tests successfully for the x86_64-linux and x86_64-windows targets. Building for 32-bit targets is likely to result in compile errors. Due to the use of tail calls in wasmstint, building for non-x86_64 targets also currently requires the LLVM backend, set with the -Duse-llvm=always build option.

Additionally, big-endian targets are not supported at all.

About

Stackless, in-place, WebAssembly interpreter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors