#singlepass #compiler

no-std wasmer-compiler-singlepass

Singlepass compiler for Wasmer WebAssembly runtime

76 releases (43 stable)

new 5.0.3 Dec 7, 2024
5.0.2 Nov 25, 2024
5.0.0 Oct 29, 2024
4.4.0 Oct 4, 2024
1.0.0-alpha5 Nov 6, 2020

#1431 in WebAssembly

Download history 5367/week @ 2024-08-19 5778/week @ 2024-08-26 5260/week @ 2024-09-02 4866/week @ 2024-09-09 3695/week @ 2024-09-16 5640/week @ 2024-09-23 4129/week @ 2024-09-30 4123/week @ 2024-10-07 4129/week @ 2024-10-14 4194/week @ 2024-10-21 4711/week @ 2024-10-28 4349/week @ 2024-11-04 3289/week @ 2024-11-11 3594/week @ 2024-11-18 3706/week @ 2024-11-25 5647/week @ 2024-12-02

16,621 downloads per month
Used in 65 crates (17 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, sys::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

~9–18MB
~264K SLoC