74 releases (41 stable)
5.0.1 | Nov 6, 2024 |
---|---|
4.4.0 | Oct 4, 2024 |
4.3.5 | Jul 16, 2024 |
4.2.6 | Mar 4, 2024 |
1.0.0-alpha5 | Nov 6, 2020 |
#1431 in WebAssembly
17,013 downloads per month
Used in 63 crates
(18 directly)
2MB
43K
SLoC
wasmer-compiler-singlepass
This crate contains a compiler implementation based on the Singlepass linear compiler.
Usage
use wasmer::{Store, sys::EngineBuilder};
use wasmer_compiler_singlepass::Singlepass;
let compiler = Singlepass::new();
let mut store = Store::new(compiler);
Note: you can find a full working example using Singlepass compiler here.
When to use Singlepass
Singlepass is designed to emit compiled code at linear time, as such
is not prone to JIT bombs and also offers great compilation
performance orders of magnitude faster than
wasmer-compiler-cranelift
and wasmer-compiler-llvm
, however
with a bit slower runtime speed.
The fact that singlepass is not prone to JIT bombs and offers a very predictable compilation speed makes it ideal for blockchains and other systems where fast and consistent compilation times are very critical.
Dependencies
~9–19MB
~273K SLoC