#llvm #compiler

wasmer-compiler-llvm

LLVM compiler for Wasmer WebAssembly runtime

60 releases (30 stable)

new 4.2.8 Apr 8, 2024
4.2.6 Mar 4, 2024
4.2.5 Dec 23, 2023
4.2.3 Oct 27, 2023
1.0.0-alpha5 Nov 6, 2020

#612 in WebAssembly

Download history 386/week @ 2023-12-23 430/week @ 2023-12-30 534/week @ 2024-01-06 502/week @ 2024-01-13 594/week @ 2024-01-20 747/week @ 2024-01-27 561/week @ 2024-02-03 1485/week @ 2024-02-10 982/week @ 2024-02-17 1376/week @ 2024-02-24 1481/week @ 2024-03-02 2527/week @ 2024-03-09 2262/week @ 2024-03-16 1679/week @ 2024-03-23 2550/week @ 2024-03-30 1714/week @ 2024-04-06

8,316 downloads per month
Used in 15 crates (10 directly)

MIT license

1.5MB
31K 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 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 14

Or in macOS:

brew install llvm@14

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

Dependencies

~11–22MB
~309K SLoC