summaryrefslogtreecommitdiff
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 5fbb8239..57b71cba 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -528,6 +528,22 @@ pub fn plugin_ui_abi_minimum_version() -> u32 {
binaryninjacore_sys::BN_MINIMUM_UI_ABI_VERSION
}
+pub fn add_required_plugin_dependency<S: string::BnStrCompatible>(name: S) {
+ unsafe {
+ binaryninjacore_sys::BNAddRequiredPluginDependency(
+ name.into_bytes_with_nul().as_ref().as_ptr() as *const std::os::raw::c_char,
+ )
+ };
+}
+
+pub fn add_optional_plugin_dependency<S: string::BnStrCompatible>(name: S) {
+ unsafe {
+ binaryninjacore_sys::BNAddOptionalPluginDependency(
+ name.into_bytes_with_nul().as_ref().as_ptr() as *const std::os::raw::c_char,
+ )
+ };
+}
+
// Provide ABI version automatically so that the core can verify binary compatibility
#[no_mangle]
#[allow(non_snake_case)]