#singlepass #compiler

no-std wasmer-compiler-singlepass

Singlepass compiler for Wasmer WebAssembly runtime

63 releases (31 stable)

new 4.3.0 May 10, 2024
4.3.0-alpha.1 Apr 25, 2024
4.2.6 Mar 4, 2024
4.2.5 Dec 23, 2023
1.0.0-alpha5 Nov 6, 2020

#229 in WebAssembly

Download history 5738/week @ 2024-01-23 8545/week @ 2024-01-30 7845/week @ 2024-02-06 7984/week @ 2024-02-13 7080/week @ 2024-02-20 6505/week @ 2024-02-27 6090/week @ 2024-03-05 7715/week @ 2024-03-12 6186/week @ 2024-03-19 6428/week @ 2024-03-26 6758/week @ 2024-04-02 6561/week @ 2024-04-09 6544/week @ 2024-04-16 6440/week @ 2024-04-23 5404/week @ 2024-04-30 7250/week @ 2024-05-07

27,195 downloads per month
Used in 63 crates (16 directly)

MIT license

2MB
43K 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, 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

~15–27MB
~475K SLoC