#llvm #compiler

wasmer-compiler-llvm

LLVM compiler for Wasmer WebAssembly runtime

78 releases (44 stable)

new 5.0.5-rc1 Jan 3, 2025
5.0.4 Dec 17, 2024
5.0.2 Nov 25, 2024
4.4.0 Oct 4, 2024
1.0.0-alpha5 Nov 6, 2020

#1047 in WebAssembly

Download history 748/week @ 2024-09-13 1183/week @ 2024-09-20 1254/week @ 2024-09-27 1362/week @ 2024-10-04 1003/week @ 2024-10-11 731/week @ 2024-10-18 1291/week @ 2024-10-25 1393/week @ 2024-11-01 1013/week @ 2024-11-08 728/week @ 2024-11-15 1123/week @ 2024-11-22 1461/week @ 2024-11-29 2525/week @ 2024-12-06 2182/week @ 2024-12-13 1573/week @ 2024-12-20 1853/week @ 2024-12-27

8,512 downloads per month
Used in 16 crates (10 directly)

MIT license

1.5MB
33K 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 performance near to native speeds.

Requirements

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

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 15

Or in macOS:

brew install llvm@15

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

Dependencies

~12–21MB
~326K SLoC