Files
wasmer/lib/compiler-cranelift
Amanieu d'Antras f16bd35d3c Remove old ref-counted extern support from compiler-cranelift
It was never fully implemented and we're moving to a different way of
tracking ExternRef lifetimes.
2022-07-19 15:31:51 +03:00
..
2020-04-21 21:37:33 -07:00
2022-06-08 14:12:49 +03:00

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_with_engine(&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.