14 releases (4 stable)

2.0.0 Jun 16, 2021
1.0.2 Feb 5, 2021
1.0.0-rc1 Dec 23, 2020
1.0.0-alpha5 Nov 6, 2020

#315 in WebAssembly

Download history 1105/week @ 2021-04-03 1451/week @ 2021-04-10 1438/week @ 2021-04-17 1214/week @ 2021-04-24 1707/week @ 2021-05-01 1056/week @ 2021-05-08 604/week @ 2021-05-15 678/week @ 2021-05-22 582/week @ 2021-05-29 754/week @ 2021-06-05 877/week @ 2021-06-12 938/week @ 2021-06-19 577/week @ 2021-06-26 847/week @ 2021-07-03 1002/week @ 2021-07-10 666/week @ 2021-07-17

4,521 downloads per month
Used in 12 crates (5 directly)

MIT license

1MB
21K SLoC

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, Universal};
use wasmer_compiler_singlepass::Singlepass;

let compiler = Singlepass::new();
// Put it into an engine and add it to the store
let store = Store::new(&Universal::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.

Dependencies

~9MB
~183K SLoC