summaryrefslogtreecommitdiff
path: root/rust/examples
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-09-29 22:10:20 -0400
committerGlenn Smith <glenn@vector35.com>2022-09-29 22:16:47 -0400
commite51abf509d7040aac768e183a47c966613b67bb7 (patch)
tree289b30c06b90db94509488e299a5958d25c9b37e /rust/examples
parentd781bdbee8a7327661a56647231c4d4ece7f0074 (diff)
Fix updated rust api
Diffstat (limited to 'rust/examples')
-rw-r--r--rust/examples/template/Cargo.toml8
-rw-r--r--rust/examples/template/src/main.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/rust/examples/template/Cargo.toml b/rust/examples/template/Cargo.toml
index 6a691e3d..37073090 100644
--- a/rust/examples/template/Cargo.toml
+++ b/rust/examples/template/Cargo.toml
@@ -8,9 +8,9 @@ edition = "2018"
# crate-type = ["cdylib"]
# You can point at the BinaryNinja dependency in one of two ways, via path:
-# [dependencies]
-# binaryninja = {path="../../"}
+[dependencies]
+binaryninja = {path="../../"}
# Or directly at the git repo:
-[dependencies]
-binaryninja = {git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"}
+# [dependencies]
+# binaryninja = {git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"}
diff --git a/rust/examples/template/src/main.rs b/rust/examples/template/src/main.rs
index 9125aeaa..1fbe3c83 100644
--- a/rust/examples/template/src/main.rs
+++ b/rust/examples/template/src/main.rs
@@ -13,7 +13,7 @@ fn main() {
println!("Loading binary...");
let bv = binaryninja::open_view("/bin/cat").expect("Couldn't open `/bin/cat`");
- println!("Filename: `{}`", bv.metadata().filename());
+ println!("Filename: `{}`", bv.file().filename());
println!("File size: `{:#x}`", bv.len());
println!("Function count: {}", bv.functions().len());