mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-16 17:18:57 +00:00
This commit extracts changes to core libraries made in the WASIX branch. It is not reasonable to extract the partial commit history, so this is just a batch commit. The history will make a bit more sense again if we decide to merge the WASIX branch with full commit history.
wasmer-compiler-singlepass

This crate contains a compiler implementation based on the Singlepass linear compiler.
Usage
use wasmer::{Store, 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.