aya-rustc-llvm-proxy

Crates.ioaya-rustc-llvm-proxy
lib.rsaya-rustc-llvm-proxy
version0.9.3
sourcesrc
created_at2021-12-17 15:33:37.987653
updated_at2024-08-12 10:34:10.965809
descriptionDynamically proxy LLVM calls into Rust own shared library
homepage
repositoryhttps://github.com/aya-rs/rustc-llvm-proxy
max_upload_size
id499670
size30,236
owners (github:aya-rs:owners)

documentation

README

Aya Rustc LLVM Proxy

Build Current Version Docs

This is a fork of the rustc-llvm-proxy crate.

Dynamically proxy LLVM calls into Rust own shared library! 🎉

Use cases

Normally there is no much need for the crate, except a couple of exotic cases:

  • Your crate is some kind build process helper that leverages LLVM (e.g. bpf-linker),
  • Your crate needs to stay up to date with Rust LLVM version (again bpf-linker),
  • You would prefer not to have dependencies on host LLVM libs (as always bpf-linker).

Usage

First, you need to make sure no other crate links your binary against system LLVM library. In case you are using llvm-sys, this can be achieved with a special feature:

[dependencies.llvm-sys]
version = "60"
features = ["no-llvm-linking", "disable-alltargets-init"]

Then all you need to do is to include the crate into your project:

[dependencies]
aya-rustc-llvm-proxy = "0.9"
extern crate aya_rustc_llvm_proxy;
Commit count: 113

cargo fmt