From c528f3ad0e1abd4168b1507e8c30bc14c4a6a736 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Wed, 17 Apr 2024 12:35:04 -0300 Subject: fix rust doc code --- rust/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rust/src/lib.rs') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 739bfbf6..8a51a7d8 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -49,7 +49,7 @@ //! //! Create a new library (`cargo new --lib `) and include the following in your `Cargo.toml`: //! -//! ``` +//! ```toml //! [lib] //! crate-type = ["cdylib"] //! @@ -73,17 +73,19 @@ //! //! ### `main.rs` //! Standalone binaries need to initialize Binary Ninja before they can work. You can do this through [`headless::Session`], [`headless::script_helper`], or [`headless::init()`] at start and [`headless::shutdown()`] at shutdown. -//! ```rust +//! ```no_run //! // This loads all the core architecture, platform, etc plugins //! // Standalone executables need to call this, but plugins do not //! let headless_session = binaryninja::headless::Session::new(); //! //! println!("Loading binary..."); //! let bv = headless_session.load("/bin/cat").expect("Couldn't open `/bin/cat`"); +//! +//! // Your code here... //! ``` //! //! ### `Cargo.toml` -//! ``` +//! ```toml //! [dependencies] //! binaryninja = { git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"} //! ``` @@ -215,7 +217,7 @@ pub fn load(filename: S) -> Option