Files
wasmer/lib/compiler-singlepass
ptitSeb f0478b9464 Added some unit testing to singlepass compiler (#3751)
* Added some unit testing to singlepass compiler

* More emitter testing for x86_64 backend

* Added more emiter test to singlepass x86_64 backend

* Added some emiter test for singlepass arm64 backend

* More test emiter for singlepass arm64

* Added more Singlepass ARM64 backend
2023-04-12 12:07:21 +00:00
..
2023-04-05 13:25:40 +02:00
2022-07-28 15:20:26 +03:00

wasmer-compiler-singlepass Build Status Join Wasmer Slack MIT License crates.io

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.