#cranelift #compiler #wasmer #wasm-compiler

no-std wasmer-compiler-cranelift

Cranelift compiler for Wasmer WebAssembly runtime

83 releases (46 stable)

6.0.0 Apr 24, 2025
6.0.0-beta.1 Mar 7, 2025
6.0.0-alpha.2 Feb 26, 2025
5.0.6 May 2, 2025
1.0.0-alpha5 Nov 6, 2020

#1518 in WebAssembly

Download history 23055/week @ 2025-01-12 29002/week @ 2025-01-19 27925/week @ 2025-01-26 28784/week @ 2025-02-02 20952/week @ 2025-02-09 30566/week @ 2025-02-16 35957/week @ 2025-02-23 35567/week @ 2025-03-02 32285/week @ 2025-03-09 48437/week @ 2025-03-16 43126/week @ 2025-03-23 31455/week @ 2025-03-30 37868/week @ 2025-04-06 21059/week @ 2025-04-13 23414/week @ 2025-04-20 18018/week @ 2025-04-27

101,746 downloads per month
Used in 44 crates (12 directly)

MIT license

1MB
19K SLoC

wasmer-compiler-cranelift Build Status Join Wasmer Slack MIT License crates.io

This crate contains a compiler implementation based on Cranelift.

Usage

use wasmer::{Store, sys::EngineBuilder};
use wasmer_compiler_cranelift::Cranelift;

let compiler = Cranelift::new();
let mut store = Store::new(compiler);

Note: you can find a full working example using Cranelift compiler here.

When to use Cranelift

We recommend using this compiler crate only for development proposes. For production we recommend using wasmer-compiler-llvm as it offers a much better runtime speed (50% faster on average).

Acknowledgments

This project borrowed some of the function lowering from cranelift-wasm.

Please check Wasmer ATTRIBUTIONS to further see licenses and other attributions of the project.

Dependencies

~17–26MB
~435K SLoC