summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2024-11-07 16:48:21 -0500
committerMason Reed <mason@vector35.com>2024-11-08 03:13:53 -0500
commite348a79c132b1003b5bc5021f64ba205462248fd (patch)
tree0140543e4fe13e06e6640139929a5c66b5b06394 /plugins
parent66b7926e976185111dbbf1ccb6696bddde6555de (diff)
WARP: Misc changes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/warp/Cargo.toml3
-rw-r--r--plugins/warp/build.rs4
-rw-r--r--plugins/warp/src/plugin.rs3
-rw-r--r--plugins/warp/src/plugin/types.rs4
4 files changed, 9 insertions, 5 deletions
diff --git a/plugins/warp/Cargo.toml b/plugins/warp/Cargo.toml
index 261e834b..88223e7d 100644
--- a/plugins/warp/Cargo.toml
+++ b/plugins/warp/Cargo.toml
@@ -23,6 +23,9 @@ ar = { git = "https://github.com/mdsteele/rust-ar" }
tempdir = "0.3.7"
serde_json = "1.0.132"
+[features]
+test = []
+
[build-dependencies]
cc = "1.1.28"
diff --git a/plugins/warp/build.rs b/plugins/warp/build.rs
index 907abff5..1239f000 100644
--- a/plugins/warp/build.rs
+++ b/plugins/warp/build.rs
@@ -2,7 +2,7 @@
use std::path::PathBuf;
use std::process::Command;
-#[cfg(test)]
+#[cfg(feature = "test")]
fn compile_rust(file: PathBuf) -> bool {
let out_dir = std::env::var_os("OUT_DIR").unwrap();
let rustc = std::env::var_os("RUSTC").unwrap();
@@ -28,7 +28,7 @@ fn main() {
}
}
- #[cfg(test)]
+ #[cfg(feature = "test")]
{
let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR specified");
let out_dir_path = PathBuf::from(out_dir);
diff --git a/plugins/warp/src/plugin.rs b/plugins/warp/src/plugin.rs
index 93f4f3b8..67d77dda 100644
--- a/plugins/warp/src/plugin.rs
+++ b/plugins/warp/src/plugin.rs
@@ -186,7 +186,8 @@ pub extern "C" fn CorePluginInit() -> bool {
binaryninja::command::register(
"WARP\\Debug\\Apply Signature File Types",
"Load all types from a signature file and ignore functions",
- types::LoadTypesCommand {},
+ types::LoadTypes {},
+ );
);
binaryninja::command::register_for_function(
diff --git a/plugins/warp/src/plugin/types.rs b/plugins/warp/src/plugin/types.rs
index 5ddff403..fb030bfe 100644
--- a/plugins/warp/src/plugin/types.rs
+++ b/plugins/warp/src/plugin/types.rs
@@ -3,9 +3,9 @@ use binaryninja::binaryview::{BinaryView, BinaryViewExt};
use binaryninja::command::Command;
use std::time::Instant;
-pub struct LoadTypesCommand;
+pub struct LoadTypes;
-impl Command for LoadTypesCommand {
+impl Command for LoadTypes {
fn action(&self, view: &BinaryView) {
let Some(file) = binaryninja::interaction::get_open_filename_input(
"Apply Signature File Types",