28 releases (9 stable)

new 3.0.0-beta.2 Sep 27, 2022
3.0.0-alpha.4 Jul 29, 2022
2.3.0 Jun 6, 2022
2.2.1 Mar 16, 2022
1.0.0-alpha5 Nov 6, 2020

#659 in WebAssembly

Download history 301/week @ 2022-06-09 373/week @ 2022-06-16 397/week @ 2022-06-23 445/week @ 2022-06-30 309/week @ 2022-07-07 353/week @ 2022-07-14 447/week @ 2022-07-21 624/week @ 2022-07-28 443/week @ 2022-08-04 511/week @ 2022-08-11 502/week @ 2022-08-18 469/week @ 2022-08-25 477/week @ 2022-09-01 852/week @ 2022-09-08 692/week @ 2022-09-15 729/week @ 2022-09-22

2,828 downloads per month
Used in fewer than 7 crates

MIT license

1.5MB
28K SLoC

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

This crate contains a compiler implementation based on the LLVM Compiler Infrastructure.

Usage

use wasmer::{Store, EngineBuilder};
use wasmer_compiler_llvm::LLVM;

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

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

When to use LLVM

We recommend using LLVM as the default compiler when running WebAssembly files on any production system, as it offers maximum peformance near to native speeds.

Requirements

The LLVM compiler requires a valid installation of LLVM in your system. It currently requires LLVM 12.

You can install LLVM easily on your Debian-like system via this command:

wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh
sudo bash /tmp/llvm.sh 12

Or in macOS:

brew install llvm

Or via any of the pre-built binaries that LLVM offers.

Dependencies

~11MB
~232K SLoC