Skip to content

Commit 44d267e

Browse files
committed
Fix crate path
Signed-off-by: Dave Tucker <[email protected]>
1 parent 93314f2 commit 44d267e

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

build.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,14 @@ mod llvm {
135135
.packages
136136
.into_iter()
137137
.find(|item| item.name == "llvm-sys")
138-
.ok_or_else(|| format_err!(
139-
"Unable to find 'llvm-sys' in the crate metadata"
140-
))?;
138+
.ok_or_else(|| format_err!("Unable to find 'llvm-sys' in the crate metadata"))?;
141139

142140
let llvm_lib_rs_path = llvm_dependency
143-
.targets
144-
.into_iter()
145-
.find(|item| item.name == "llvm-sys")
146-
.ok_or_else(||format_err!(
147-
"Unable to find lib target for 'llvm-sys' crate"
148-
))?
149-
.src_path;
141+
.targets
142+
.into_iter()
143+
.find(|item| item.name == "llvm-sys")
144+
.ok_or_else(|| format_err!("Unable to find lib target for 'llvm-sys' crate"))?
145+
.src_path;
150146

151147
Ok(llvm_lib_rs_path.parent().unwrap().into())
152148
}
@@ -201,7 +197,8 @@ mod llvm {
201197
let abi_name = self
202198
.name
203199
.as_ref()
204-
.map(|item| item.value()).unwrap_or_default();
200+
.map(|item| item.value())
201+
.unwrap_or_default();
205202

206203
abi_name == "C"
207204
}

src/lib.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
#![deny(warnings)]
2-
#![allow(non_snake_case, unused_imports, unused_macros, deprecated, clippy::missing_safety_doc)]
3-
2+
#![allow(
3+
non_snake_case,
4+
unused_imports,
5+
unused_macros,
6+
deprecated,
7+
clippy::missing_safety_doc
8+
)]
9+
10+
//! This is a **fork** of the [rustc-llvm-proxy](https://github.com/denzp/rustc-llvm-proxy) crate.
11+
//!
412
//! Dynamically proxy LLVM calls into Rust own shared library! 🎉
513
//!
614
//! ## Use cases
715
//! Normally there is no much need for the crate, except a couple of exotic cases:
816
//!
9-
//! * Your crate is some kind build process helper that leverages LLVM (e.g. [ptx-linker](https://github.com/denzp/rust-ptx-linker)),
10-
//! * Your crate needs to stay up to date with Rust LLVM version (again [ptx-linker](https://github.com/denzp/rust-ptx-linker)),
11-
//! * You would prefer not to have dependencies on host LLVM libs (as always [ptx-linker](https://github.com/denzp/rust-ptx-linker)).
17+
//! * Your crate is some kind build process helper that leverages LLVM (e.g. [bpf-linker](https://github.com/aya-rs/bpf-linker)),
18+
//! * Your crate needs to stay up to date with Rust LLVM version (again [bpf-linker](https://github.com/aya-rs/bpf-linker)),
19+
//! * You would prefer not to have dependencies on host LLVM libs (as always [bpf-linker](https://github.com/aya-rs/bpf-linker)).
1220
//!
1321
//! ## Usage
1422
//! First, you need to make sure no other crate links your binary against system LLVM library.
@@ -28,7 +36,7 @@
2836
//! ```
2937
//!
3038
//! ``` rust
31-
//! extern crate rustc_llvm_proxy;
39+
//! extern crate aya_rustc_llvm_proxy;
3240
//! ```
3341
3442
#[macro_use]

tests/llvm-api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
extern crate aya_rustc_llvm_proxy;
12
extern crate llvm_sys;
2-
extern crate rustc_llvm_proxy;
33

44
use llvm_sys::core::*;
55
use std::ffi::{CStr, CString};

0 commit comments

Comments
 (0)