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

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

#220 in Build Utils

Download history 859/week @ 2023-12-19 604/week @ 2023-12-26 768/week @ 2024-01-02 706/week @ 2024-01-09 697/week @ 2024-01-16 772/week @ 2024-01-23 614/week @ 2024-01-30 844/week @ 2024-02-06 1183/week @ 2024-02-13 1270/week @ 2024-02-20 1312/week @ 2024-02-27 1000/week @ 2024-03-05 950/week @ 2024-03-12 923/week @ 2024-03-19 584/week @ 2024-03-26 707/week @ 2024-04-02

3,309 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–6.5MB
~16K SLoC