#llvm

sys aya-rustc-llvm-proxy

Dynamically proxy LLVM calls into Rust own shared library

2 unstable releases

0.4.0 May 16, 2022
0.3.0 Dec 17, 2021

#125 in Build Utils

Download history 67/week @ 2022-03-06 112/week @ 2022-03-13 110/week @ 2022-03-20 147/week @ 2022-03-27 88/week @ 2022-04-03 83/week @ 2022-04-10 135/week @ 2022-04-17 290/week @ 2022-04-24 169/week @ 2022-05-01 116/week @ 2022-05-08 379/week @ 2022-05-15 282/week @ 2022-05-22 382/week @ 2022-05-29 394/week @ 2022-06-05 108/week @ 2022-06-12 180/week @ 2022-06-19

1,088 downloads per month
Used in bpf-linker

MIT license

18KB
399 lines

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.3"
extern crate aya_rustc_llvm_proxy;

Dependencies

~0.4–1MB
~21K SLoC