summaryrefslogtreecommitdiff
path: root/rust/examples/flowgraph/src
diff options
context:
space:
mode:
Diffstat (limited to 'rust/examples/flowgraph/src')
-rw-r--r--rust/examples/flowgraph/src/lib.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/rust/examples/flowgraph/src/lib.rs b/rust/examples/flowgraph/src/lib.rs
index 799b0470..4d5c2241 100644
--- a/rust/examples/flowgraph/src/lib.rs
+++ b/rust/examples/flowgraph/src/lib.rs
@@ -4,14 +4,15 @@ use binaryninja::{
disassembly::{DisassemblyTextLine, InstructionTextToken, InstructionTextTokenType},
flowgraph::{BranchType, EdgePenStyle, EdgeStyle, FlowGraph, FlowGraphNode, ThemeColor},
};
+use binaryninja::plugin_abi_version;
fn test_graph(view: &BinaryView) {
let graph = FlowGraph::new();
let disassembly_lines_a = vec![DisassemblyTextLine::from(vec![
- InstructionTextToken::new(InstructionTextTokenType::TextToken, "Li"),
- InstructionTextToken::new(InstructionTextTokenType::TextToken, "ne"),
- InstructionTextToken::new(InstructionTextTokenType::TextToken, " 1"),
+ InstructionTextToken::new(InstructionTextTokenType::TextToken, "Li", 0),
+ InstructionTextToken::new(InstructionTextTokenType::TextToken, "ne", 0),
+ InstructionTextToken::new(InstructionTextTokenType::TextToken, " 1", 0),
])];
let node_a = FlowGraphNode::new(&graph);
@@ -48,3 +49,8 @@ pub extern "C" fn UIPluginInit() -> bool {
);
true
}
+
+#[no_mangle]
+pub extern "C" fn UIPluginABIVersion() -> u32 {
+ plugin_abi_version()
+}