From eef93b932844110cf19a4b2741b528623b77998e Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Mon, 1 Sep 2025 17:47:08 -0400 Subject: Add option to build rust api without linking to core --- rust/binaryninjacore-sys/Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rust/binaryninjacore-sys/Cargo.toml') diff --git a/rust/binaryninjacore-sys/Cargo.toml b/rust/binaryninjacore-sys/Cargo.toml index bfd49a41..d4faaec8 100644 --- a/rust/binaryninjacore-sys/Cargo.toml +++ b/rust/binaryninjacore-sys/Cargo.toml @@ -7,8 +7,15 @@ edition = "2021" links = "binaryninjacore" license = "Apache-2.0" +[features] +default = ["core"] +# If disabled, a stub binaryninjacore library will be generated and linked. +# This feature should only be disabled for shared libraries that will later be loaded in the same process as the real binaryninjacore. +core = [] + [build-dependencies] bindgen = "0.71.1" # TODO: Remove this once bindgen correctly pins the version. # proc-macro2 v1.0.79 does not have https://docs.rs/proc-macro2/1.0.80/proc_macro2/struct.Literal.html#method.c_string -proc-macro2 = ">=1.0.80" \ No newline at end of file +proc-macro2 = ">=1.0.80" +cmake = "0.1" -- cgit v1.3.1