#llvm

sys rustc-llvm-proxy

Dynamically proxy LLVM calls into Rust own shared library

12 releases

0.2.0 Jan 2, 2020
0.1.11 Jan 2, 2020
0.1.10 Jun 17, 2019
0.1.9 Jan 26, 2019
0.1.1 Aug 19, 2018

#48 in #llvm

Download history 63/week @ 2022-06-09 87/week @ 2022-06-16 103/week @ 2022-06-23 96/week @ 2022-06-30 83/week @ 2022-07-07 64/week @ 2022-07-14 94/week @ 2022-07-21 105/week @ 2022-07-28 94/week @ 2022-08-04 116/week @ 2022-08-11 64/week @ 2022-08-18 112/week @ 2022-08-25 94/week @ 2022-09-01 95/week @ 2022-09-08 68/week @ 2022-09-15 64/week @ 2022-09-22

354 downloads per month
Used in ptx-linker

MIT license

18KB
391 lines

Rustc LLVM Proxy

Build Status Build status Current Version Docs

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. ptx-linker),
  • Your crate needs to stay up to date with Rust LLVM version (again ptx-linker),
  • You would prefer not to have dependencies on host LLVM libs (as always ptx-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]
rustc-llvm-proxy = "0.2"
extern crate rustc_llvm_proxy;

Dependencies

~0.4–1MB
~21K SLoC