Crates.io | wasmer-compiler-llvm |
lib.rs | wasmer-compiler-llvm |
version | 5.0.3 |
source | src |
created_at | 2020-08-15 00:39:16.539489 |
updated_at | 2024-12-07 16:49:22.451991 |
description | LLVM compiler for Wasmer WebAssembly runtime |
homepage | https://wasmer.io/ |
repository | https://github.com/wasmerio/wasmer |
max_upload_size | |
id | 276864 |
size | 766,312 |
wasmer-compiler-llvm
This crate contains a compiler implementation based on the LLVM Compiler Infrastructure.
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.
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.
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.