From 70be4645d30c8017524ae2b444ac7e0c0a8448a6 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Tue, 29 Jun 2021 11:35:06 -0400 Subject: Rust API : No longer update to latest cargo nightly; Add link args back to -sys to reduce build errors --- rust/README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'rust/README.md') diff --git a/rust/README.md b/rust/README.md index 39b5e9b0..815b449b 100644 --- a/rust/README.md +++ b/rust/README.md @@ -4,7 +4,7 @@ > :warning: **These bindings are in a very early beta, only have partial support for the core APIs and are still actively under development. Compatibility _will_ break and conventions _will_ change! They are being used for core Binary Ninja features however, so we expect much of what is already there to be reliable enough to build on, just don't be surprised if your plugins/scripts need to hit a moving target.** -> :warning: This project requires **Rust Nightly** to build with those fancy linker arguments +> :warning: This project requires **Rust Nightly** to build with those fancy linker arguments - most recent tested version: `cargo 1.55.0-nightly (9233aa06c 2021-06-22)` ## Dependencies @@ -16,7 +16,33 @@ Rust **Nightly** ## How to use -See [`examples/template`](examples/template). +See [`examples/template`](examples/template) for more details. + +### To write a plugin: + +`Cargo.toml`: +``` +[lib] +crate-type = ["cdylib"] + +[dependencies] +binaryninja = {git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"} +``` + +See the `./examples/`. Plugin registration commands are in `binaryninja::command::*` + + +### To write a standalone executable: + +`Cargo.toml`: +``` +[dependencies] +binaryninja = { git = "https://github.com/Vector35/binaryninja-api.git", branch = "dev"} +``` + +All standalone binaries should call both `binaryninja::headless::init()` and `binaryninja::headless::shutdown()`. +All standalone binaries need to provide a `build.rs`. +See [`examples/template`](examples/template) for details. --- -- cgit v1.3.1