#llvm #proxy #shared #calls #own #version #dynamically

sys build aya-rustc-llvm-proxy

Dynamically proxy LLVM calls into Rust own shared library

9 releases (breaking)

0.9.2 Mar 21, 2024
0.9.0 Sep 19, 2023
0.7.0 Jul 25, 2023
0.5.0 Sep 7, 2022
0.3.0 Dec 17, 2021

#219 in Build Utils

Download history 558/week @ 2024-02-01 903/week @ 2024-02-08 1295/week @ 2024-02-15 1394/week @ 2024-02-22 1127/week @ 2024-02-29 1038/week @ 2024-03-07 892/week @ 2024-03-14 877/week @ 2024-03-21 554/week @ 2024-03-28 732/week @ 2024-04-04 648/week @ 2024-04-11 714/week @ 2024-04-18 668/week @ 2024-04-25 638/week @ 2024-05-02 680/week @ 2024-05-09 444/week @ 2024-05-16

2,533 downloads per month
Used in bpf-linker

MIT license

28KB
504 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.9"
extern crate aya_rustc_llvm_proxy;

Dependencies

~0.4–6MB
~16K SLoC