Skip to content

wasm-blockchain/runtimes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Runtimes

Catalog of Wasm runtimes together with the corresponding tests and benchmarks. This catalog is specifically focused on the runtimes used or potentially useful for the blockchains.

Features

Runtime Wasmer Wasmtime Wasmi
Backend Singlepass Cranelift LLVM Cranelift Lightbeam
Type Non-optimizing
compiler
Optimizing
compiler
Optimizing
compiler
Optimizing
compiler
Non-optimizing
compiler
Interpreter
WASI
Metering* 🔁6 metered_wasmi
SIMD 🔁
Multi-value return 🔁 🔁 🔁
  • ✅ -- yes
  • 🔁 -- in progress
  • ❓ -- unknown
  • ❌ -- no

Metering

Currently there are three implementations of the metering:

  • pwasm-utils by Parity, which is a code transformation tool that injects metering code into a Wasm file;
  • Wasmer runtime is able to perform gas metering by injecting low-level metering code upon Wasm compilation;
  • wasm-metering by Ewasm -- currently orphaned, gas metering injection.

Additionaly Wasmi has its own version with embedded metering functionality, see metered_wasmi.

Both pwasm-utils by Parity and wasm-metering by Ewasm are code transformation tools that can be combined with any Wasm runtime, e.g. someone can inject gas metering into the code before passing it to a runtime for execution.

OS Support

Runtime Wasmer Wasmtime Wasmi
Backend Singlepass Cranelift LLVM Cranelift Lightbeam
GNU Linux
MacOS
Windows NT #347

Testing

Runtime Wasmer Wasmtime Wasmi
Backend Singlepass Cranelift LLVM Cranelift Lightbeam
Spec tests 2 2 2
cargo-fuzz (libfuzzer) 3 3 4
honggfuzz 3 3 4
aflfuzz 3 3

Note, additionally to fuzz tests provided by Wasmer Trail of Bits performed volatility study of Wasmer and have created afl test that you can find in wasmer-afl directory.

Spec tests

Both Wasmer and Wasmi use official test suite to verify compatibility with the Wasm spec.

Additional properties

Additionaly Wasmtime+Cranelift supports the following, according to @tschneidereit:

  • Debugging in gdb/lldb
  • Openly governed
  • License gives a patent grant

Footnotes

1: Wasmer support of features by backend

2: Wasmer spec tests

3: Wasmer fuzz tests

4: Wasmi homepage

5: Wasm official test suite

6: There are rumors of metering projects for Cranelift/Wasmtime. They might not be public, according to @tschneidereit

About

Catalog of Wasm runtimes together with the corresponding tests and benchmarks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published