#cranelift #compiler

no-std wasmer-compiler-cranelift

Cranelift compiler for Wasmer WebAssembly runtime

60 releases (30 stable)

4.2.8 Apr 6, 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

#1071 in WebAssembly

Download history 7534/week @ 2023-12-25 20909/week @ 2024-01-01 23428/week @ 2024-01-08 26702/week @ 2024-01-15 21334/week @ 2024-01-22 18704/week @ 2024-01-29 24093/week @ 2024-02-05 19691/week @ 2024-02-12 16927/week @ 2024-02-19 17177/week @ 2024-02-26 22111/week @ 2024-03-04 25491/week @ 2024-03-11 21105/week @ 2024-03-18 22027/week @ 2024-03-25 22584/week @ 2024-04-01 16719/week @ 2024-04-08

84,567 downloads per month
Used in 41 crates (12 directly)

MIT license

760KB
16K 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, 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

~14–25MB
~384K SLoC