Wasmer is powered by WebAssembly (opens in a new tab).
Wasmer supports many different backends, depending on your needs:
- Wasmer Native Backends:
- Singlepass: incredibly fast compilation times, ideal for Blockchain Smart Contracts (opens in a new tab)
- Cranelift: normal compilation times, good performance
- LLVM: slow compilation times, great performance
- Other Runtimes:
- V8: ideal for iOS, Android and development.
- Wasmi: ideal for iOS, or any environment where only interpreters can run.
- WAMR: ideal for IOT devices or any environment where only interpreters with limited memory can run.
- JavaScriptCore: ideal for macOS. See announcement (opens in a new tab)
- Browser: to target the web
Each of these backends supports different features and has varying support for operating systems and chipsets.
WebAssembly Features
- Bulk-memory operations: e.g. instructions with behavior similar to C's
memmoveandmemsetin 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;
Wasmer features
- 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";
- Profiling: generate profiling data for WebAssembly code to analyze performance using tools like Linux perf;
Support of features by backend
WebAssembly features:
- ✅ Supported
- 🔄 In the works
- ❌ Not yet supported (please ping us if you need this feature!)
Wasmer features: