#singlepass #compiler


Singlepass compiler for Wasmer WebAssembly runtime

13 releases (4 breaking)

new 0.10.2 May 15, 2024
0.10.1 Mar 12, 2024
0.10.0 May 8, 2024
0.7.3 Apr 12, 2024
0.1.0 Mar 6, 2024

#5 in #singlepass

Download history 143/week @ 2024-03-03 266/week @ 2024-03-10 278/week @ 2024-03-17 87/week @ 2024-03-24 89/week @ 2024-03-31 441/week @ 2024-04-07 43/week @ 2024-04-14 11/week @ 2024-04-21 3/week @ 2024-04-28 89/week @ 2024-05-05 181/week @ 2024-05-12

285 downloads per month
Used in unc-vm-runner

MIT and GPL-2.0-or-later

19K SLoC


This crate is a fork of wasmer-compiler-singlepass. A significant number of things changed, but the documentation is not up-to-date yet.

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


use unc_vm_test_api::{Store, Universal};
use unc_vm_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, 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.


~370K SLoC