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.
| 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
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.
| Runtime | Wasmer | Wasmtime | Wasmi | |||
|---|---|---|---|---|---|---|
| Backend | Singlepass | Cranelift | LLVM | Cranelift | Lightbeam | |
| GNU Linux | ✅ | ✅ | ✅ | ✅ | ❓ | ✅ |
| MacOS | ✅ | ✅ | ✅ | ✅ | ❓ | ✅ |
| Windows NT | ✅ | ✅ | ❌#347 | ✅ | ❓ | ❓ |
| 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.
Both Wasmer and Wasmi use official test suite to verify compatibility with the Wasm spec.
Additionaly Wasmtime+Cranelift supports the following, according to @tschneidereit:
- Debugging in gdb/lldb
- Openly governed
- License gives a patent grant
1: Wasmer support of features by backend
6: There are rumors of metering projects for Cranelift/Wasmtime. They might not be public, according to @tschneidereit