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/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'rust/Cargo.toml') diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 0b9ac4f3..4856f97b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,16 +7,20 @@ rust-version = "1.83.0" license = "Apache-2.0" [features] +default = ["core"] # This is used when statically linking to prevent exporting CorePluginABIVersion and UiPluginABIVersion. no_exports = [] # Add this if you want to support the demo version of the product. # This will disable certain functions that do not exist in the demo build. demo = ["no_exports"] +# 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 = ["binaryninjacore-sys/core"] [dependencies] log = { version = "0.4", features = ["std"] } rayon = { version = "1.10", optional = true } -binaryninjacore-sys = { path = "binaryninjacore-sys" } +binaryninjacore-sys = { path = "binaryninjacore-sys", default-features = false} thiserror = "2.0" serde = "1.0" serde_derive = "1.0" -- cgit v1.3.1