#cranelift #compiler

no-std wasmer-compiler-cranelift

Cranelift compiler for Wasmer WebAssembly runtime

76 releases (43 stable)

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

#1412 in WebAssembly

Download history 25053/week @ 2024-08-24 21085/week @ 2024-08-31 20087/week @ 2024-09-07 14819/week @ 2024-09-14 15988/week @ 2024-09-21 17403/week @ 2024-09-28 21371/week @ 2024-10-05 19280/week @ 2024-10-12 16935/week @ 2024-10-19 19398/week @ 2024-10-26 16908/week @ 2024-11-02 14286/week @ 2024-11-09 15217/week @ 2024-11-16 13944/week @ 2024-11-23 17448/week @ 2024-11-30 14604/week @ 2024-12-07

62,590 downloads per month
Used in 45 crates (12 directly)

MIT license

1MB
17K 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–25MB
~421K SLoC