#singlepass #compiler

no-std wasmer-compiler-singlepass

Singlepass compiler for Wasmer WebAssembly runtime

61 releases (30 stable)

4.3.0-alpha.1 Apr 25, 2024
4.2.6 Mar 4, 2024
4.2.5 Dec 23, 2023
4.2.3 Oct 27, 2023
1.0.0-alpha5 Nov 6, 2020

#460 in WebAssembly

Download history 7005/week @ 2024-01-15 6263/week @ 2024-01-22 7697/week @ 2024-01-29 7726/week @ 2024-02-05 8706/week @ 2024-02-12 6810/week @ 2024-02-19 6841/week @ 2024-02-26 5845/week @ 2024-03-04 7936/week @ 2024-03-11 5965/week @ 2024-03-18 6124/week @ 2024-03-25 6895/week @ 2024-04-01 6276/week @ 2024-04-08 7177/week @ 2024-04-15 6559/week @ 2024-04-22 4710/week @ 2024-04-29

25,422 downloads per month
Used in 62 crates (16 directly)

MIT license

1.5MB
42K 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

~8–18MB
~246K SLoC