13 releases (3 stable)

new 2.0.0-rc2 Jun 15, 2021
1.0.2 Feb 5, 2021
1.0.0-rc1 Dec 23, 2020
1.0.0-alpha5 Nov 6, 2020

#304 in WebAssembly

Download history 1807/week @ 2021-02-23 1791/week @ 2021-03-02 2233/week @ 2021-03-09 2375/week @ 2021-03-16 2103/week @ 2021-03-23 1996/week @ 2021-03-30 2293/week @ 2021-04-06 2551/week @ 2021-04-13 4978/week @ 2021-04-20 3207/week @ 2021-04-27 3141/week @ 2021-05-04 3206/week @ 2021-05-11 2286/week @ 2021-05-18 2808/week @ 2021-05-25 2185/week @ 2021-06-01 2452/week @ 2021-06-08

11,622 downloads per month
Used in 6 crates (5 directly)

MIT OR Apache-2.0 WITH LLVM-exception

1MB
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, Universal};
use wasmer_compiler_cranelift::Cranelift;

let compiler = Cranelift::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 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

~14MB
~287K SLoC