diff options
Diffstat (limited to 'rust/binaryninjacore-sys')
| -rw-r--r-- | rust/binaryninjacore-sys/Cargo.toml | 1 | ||||
| -rw-r--r-- | rust/binaryninjacore-sys/build.rs | 12 | ||||
| -rw-r--r-- | rust/binaryninjacore-sys/src/lib.rs | 1 |
3 files changed, 5 insertions, 9 deletions
diff --git a/rust/binaryninjacore-sys/Cargo.toml b/rust/binaryninjacore-sys/Cargo.toml index 7c6b080f..3c72600a 100644 --- a/rust/binaryninjacore-sys/Cargo.toml +++ b/rust/binaryninjacore-sys/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" authors = ["Ryan Snyder <ryan@vector35.com>", "Kyle Martin <kyle@vector35.com>"] build = "build.rs" edition = "2021" +links = "binaryninjacore" [build-dependencies] bindgen = "0.71.1" diff --git a/rust/binaryninjacore-sys/build.rs b/rust/binaryninjacore-sys/build.rs index 4f3cf2f4..800b8373 100644 --- a/rust/binaryninjacore-sys/build.rs +++ b/rust/binaryninjacore-sys/build.rs @@ -1,5 +1,3 @@ -extern crate bindgen; - use std::env; use std::fs::File; use std::io::BufRead; @@ -65,17 +63,13 @@ fn main() { // Make a symlink "libbinaryninjacore.so" pointing to "libbinaryninjacore.so.1" if symlink_target.exists() && symlink_source.symlink_metadata().is_err() { use std::os::unix::fs; - fs::symlink( - symlink_target, - symlink_source, - ) - .expect("failed to create required symlink"); + fs::symlink(symlink_target, symlink_source).expect("failed to create required symlink"); } println!("cargo:rustc-link-search={}", out_dir); } - println!("cargo:rustc-link-lib=binaryninjacore"); - println!("cargo:rustc-link-search={}", link_path.to_str().unwrap()); + // Emit the path to binaryninjacore consumers of this crate should pass to the linker. + println!("cargo:path={}", link_path.to_str().unwrap()); let current_line = "#define BN_CURRENT_UI_ABI_VERSION "; let minimum_line = "#define BN_MINIMUM_UI_ABI_VERSION "; diff --git a/rust/binaryninjacore-sys/src/lib.rs b/rust/binaryninjacore-sys/src/lib.rs index d39a7c00..f7e7225a 100644 --- a/rust/binaryninjacore-sys/src/lib.rs +++ b/rust/binaryninjacore-sys/src/lib.rs @@ -3,5 +3,6 @@ #![allow(non_snake_case)] #![allow(unused)] #![allow(clippy::type_complexity)] +#![doc(html_root_url = "https://dev-rust.binary.ninja/")] include!(concat!(env!("OUT_DIR"), "/bindings.rs")); |
