Access, extend, and automate IDA through a first-class Rust API.
idakit drives IDA's analysis engine from safe Rust:
use *;
// Open a database and flag every call into a risky C API.
let mut db = here?;
db.open.call?;
const SINKS: & = &;
for function in db.functions
db.close;
Usage
IDA's engine initializes once per process and runs on a single thread. The example above
used Ida::here, which initializes it on the current thread and hands the database back
directly, a good fit for a tool or test that owns its thread.
When the current thread must stay free, such as a GUI event loop or an async runtime,
Ida::run hosts the engine on its own dedicated thread instead. It hands your closure an
Ida handle whose Ida::call marshals work onto the engine from any thread:
use *;
run??;
The open database stays on the engine's thread (it is !Send). Reads borrow it and return
lightweight views like Function and Segment; writes take it by mutable reference, so a
read can't outlive a mutation.
Only one database is live at a time. Ida::here and Ida::run return
InitError::AlreadyRunning while one is already open; drop it and you can start another.
For lower-level control, idakit-sys exposes IDA's raw C bindings directly.
Requirements
- IDA Pro 9.3. A local install is needed to build, since idakit links its libraries, and a valid license to run, since IDA checks it when the engine initializes.
- A 64-bit host running Linux, macOS, or Windows.
- Rust 1.88 or newer.
- A C++17 compiler for the build: g++ or Clang on Linux and macOS, MSVC on Windows.
git, to fetch the SDK headers that match your install, unless you supply a local SDK checkout withIDA_SDK_DIR.- 64-bit databases. idakit works with
.i64and can't open a 32-bit.idb.- You don't have to bring one, though: it can analyze a binary from scratch
- A 32-bit binary is fine, since the limitation is the database format, not the target.
Building
idakit locates your IDA install automatically, in order:
IDADIR, if set.idat64on yourPATH.- The platform's default install locations:
~/ida-pro-*and/opt/on Linux,/Applications/on macOS,Program Fileson Windows.
If none match, set IDADIR to the directory holding IDA's runtime library.
The SDK headers are fetched to match your installed IDA version, so a normal build needs no extra flags. Two variables override that:
IDA_SDK_DIRbuilds against a local SDK checkout instead of fetching.IDA_SDK_CACHE_DIRrelocates the fetch cache.
License
The bindings are MIT licensed. The IDA SDK and runtime are proprietary to Hex-Rays; idakit links against your own install and redistributes none of it.