40 releases (15 stable)
new 3.2.0-beta.1 | Mar 23, 2023 |
---|---|
3.1.0 | Dec 12, 2022 |
3.0.2 | Nov 27, 2022 |
3.0.0-alpha.4 | Jul 29, 2022 |
1.0.0-alpha5 | Nov 6, 2020 |
#4 in #llvm
2,073 downloads per month
Used in 7 crates
(6 directly)
1.5MB
30K
SLoC
wasmer-compiler-llvm

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
~12MB
~260K SLoC