Wasmer Features
The Wasmer WebAssembly runtime provides various features for users and developers:
Compilers: Wasmer supports multiple compilers: Singlepass, Cranelift and LLVM. Each of these have different tradeoffs of compilation speed vs runtime speed;
Caching: compiled WebAssembly modules can be reused so subsequent runs of a Wasm file will have very little start up time;
Metering: computation time and other resources can be monitored and limits set to control how the Wasm code runs. This is also known as "gas metering";
WebAssembly Features:
Bulk-memory operations: e.g. instructions with behavior similar to C's
memmove
andmemset
in WebAssembly;Multi-value return: return multiple values from functions making data transfer between host and guest simpler;
Import & export of mutable globals: adds ability to import and export mutable globals;
Non-trapping float-to-int conversions: this proposal would establish a convention for saturating operations, to avoid introducing trapping;
Sign-extension operations: adds five new integer instructions for sign-extending 8-bit, 16-bit, and 32-bit values;
Reference types: easier and more efficient interop with host environment;
SIMD: Single Instruction, Multiple data: do heavy number crunching more quickly and/or with lower power usage.
Threads: adds a new shared linear memory type and some new operations for atomic memory access;
ABIs: it allows running different types of programs compiled to WebAssembly, with ABIs such as:
Emscripten
WASI
Support of features by Compiler
Runtime features:
Singlepass | Cranelift | LLVM | |
Emscripten | â | â | â |
WASI | â | â | â |
WebAssembly features:
Singlepass | Cranelift | LLVM | |
Bulk memory operations | â | â | â |
Multi-value return | đ | â | â |
Import & export of mutable globals | â | â | â |
Non-trapping float-to-int conversions | â | â | â |
Sign-extension operations | â | â | â |
Reference types (Phase 4) | đ | đ | đ |
SIMD (Phase 3) | âŦ | â | â |
Threads (Phase 2) | â | đ | â |
Support by Operating System
Linux | macOS | Windows | |
Cranelift | â | â | â |
LLVM | â | â | â |
Singlepass | â | â | |
WASI | â | â | â * |
poll_fd
is not fully implemented for Windows yet
Compiler Support by Chipset
x86_64 | arm64 | x86 | |
Cranelift | â | â | â |
LLVM | â | â | â |
Singlepass | â | đ | âŦ |
Language Embeddings
Wasmer enables WebAssembly usage in a lot of different languages. Here are some of the features in each of those:
Rust | C / C++ | Go | Python | Ruby | |
Terminate in host call | â | âŦ | âŦ | âŦ | âŦ |
WASI | â | â | â | â | âŦ |
WASI FS API | â | âŦ | âŦ | âŦ | âŦ |
Serialize/Deserialize | â | â | â | â | âŦ |
Metering | â | âŦ | âŦ | âŦ | âŦ |
Last updated