Files
wasmer/lib/compiler-singlepass
bors[bot] 636a533b34 Merge #1846
1846: feat: Use the same version of `smallvec` everywhere r=jubianchi a=Hywan

# Description

This patch uniformize the `smallvec` versions in all our crates.
Closes https://github.com/wasmerio/wasmer/pull/1834.

# Review

- ~[ ] Add a short description of the the change to the CHANGELOG.md file~ not necessary I guess


Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2020-11-27 15:18:14 +00:00
..
2020-09-15 14:32:16 +03:00

wasmer-compiler-singlepass Build Status Join Wasmer Slack MIT License

This crate contains a compiler implementation based on the Singlepass linear compiler.

Usage

Add this crate into your Cargo.toml dependencies:

wasmer-compiler-singlepass = "1.0.0-alpha"

And then:

use wasmer::{Store, JIT};
use wasmer_compiler_singlepass::Singlepass;

let compiler = Singlepass::new();
// Put it into an engine and add it to the store
let store = Store::new(&JIT::new(&compiler).engine());

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.