{"id":31266496,"url":"https://github.com/binarly-io/idalib","last_synced_at":"2025-09-23T16:03:39.786Z","repository":{"id":257805630,"uuid":"863660899","full_name":"binarly-io/idalib","owner":"binarly-io","description":"Idiomatic Rust bindings for the IDA SDK, enabling the development of standalone analysis tools using IDA v9.x’s idalib","archived":false,"fork":false,"pushed_at":"2025-09-14T13:32:55.000Z","size":18217,"stargazers_count":203,"open_issues_count":7,"forks_count":13,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-15T02:37:02.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binarly-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-26T17:21:44.000Z","updated_at":"2025-09-14T12:45:12.000Z","dependencies_parsed_at":"2024-09-30T20:09:25.995Z","dependency_job_id":"d9fa3159-feb8-49f7-8112-2d62009fb51d","html_url":"https://github.com/binarly-io/idalib","commit_stats":null,"previous_names":["binarly-io/idalib"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/binarly-io/idalib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarly-io%2Fidalib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarly-io%2Fidalib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarly-io%2Fidalib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarly-io%2Fidalib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binarly-io","download_url":"https://codeload.github.com/binarly-io/idalib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binarly-io%2Fidalib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275245905,"owners_count":25430803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-23T16:01:34.570Z","updated_at":"2025-09-23T16:03:39.781Z","avatar_url":"https://github.com/binarly-io.png","language":"Rust","funding_links":[],"categories":["Rust","IDA Plugins","Libraries"],"sub_categories":["Reverse engineering"],"readme":"# idalib\n\n[![crates.io](https://img.shields.io/crates/v/idalib)](https://crates.io/crates/idalib)\n[![documentation](https://img.shields.io/badge/documentation-0.7.2%2B9.2.250908-blue?link=https%3A%2F%2Fidalib.rs%2Fidalib)](https://idalib.rs/idalib/)\n[![license](https://img.shields.io/crates/l/idalib)](https://github.com/binarly-io/idalib)\n[![crates.io downloads](https://img.shields.io/crates/d/idalib)](https://crates.io/crates/idalib)\n\nIdiomatic Rust bindings for the IDA SDK, enabling the development of standalone\nanalysis tools using IDA v9.x’s idalib.\n\n## IDA support and dependencies\n\nThe bindings and examples have been tested against IDA Pro v9.2 on Windows\n(11), Linux (Ubuntu 24.04 LTS), and macOS Sequoia (Apple Silicon). The latest\nbindings are only guaranteed compatible with the latest official IDA Pro/SDK\nrelease. See the table below for compatibility:\n\n| IDA Pro version | Latest compatible idalib |\n| --------------- | ------------------------ |\n| v9.2            | 0.7.2                    |\n| v9.1            | 0.6.1                    |\n| v9.0sp1         | 0.4.1                    |\n| v9.0            | 0.3.0                    |\n\nIn addition to the latest IDA SDK and IDA itself, a recent version of\nLLVM/Clang is required (this is to help generate bindings from the SDK), it can\nbe obtained from, e.g., [here](https://github.com/llvm/llvm-project/releases).\nSee the [bindgen\ndocumentation](https://rust-lang.github.io/rust-bindgen/requirements.html) for\nextended instructions for each supported operating system/environment.\n\n## Developing with idalib\n\nFor development, only the IDA SDK is required, whereas to run tests, an IDA\ninstallation (with a valid license) is required. During build, the crates\ncan locate an IDA installation using the following environment variable:\n\n- `IDADIR` (optional) set to the directory containing the `ida` executable\n  (e.g., `/Applications/IDA Professional v9.x/Contents/macOS` for macOS, or\n  `$HOME/ida-pro-9.x` for Linux). If not set, the build script will check\n  common locations.\n\n### Projects using idalib\n\n- [xorpse/idalib-mp](https://github.com/xorpse/idalib-mp): example project demonstrating idalib + multi-processing.\n- [xorpse/parascope](https://github.com/xorpse/parascope): mass-scan source/decompiled code using weggli rulesets.\n- [0xdea/rhabdomancer](https://github.com/0xdea/rhabdomancer): locate calls to insecure API functions in a binary file.\n- [0xdea/haruspex](https://github.com/0xdea/haruspex): extract pseudo-code from the IDA Hex-Rays decompiler.\n- [0xdea/augur](https://github.com/0xdea/augur): extract strings and related pseudo-code from a binary file.\n\n### Examples\n\nA minimal project to working with `idalib` requires the following components:\n\n`Cargo.toml`:\n\n```toml\nname = \"example-analyser\"\n\n# ...\n\n[dependencies]\nidalib = \"0.7\"\n\n[build-dependencies]\nidalib-build = \"0.7\"\n```\n\n`build.rs`:\n\n```rust\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    idalib_build::configure_linkage()?;\n    Ok(())\n}\n```\n\n`src/main.rs`:\n\n```rust\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let idb = idalib::IDB::open(\"/path/to/binary\")?;\n\n    // ...\n\n    Ok(())\n}\n```\n\nMore comprehensive examples can be found in `idalib/examples`. To run them:\n\nLinux/macOS:\n\n```sh\nexport IDADIR=...\n\ncargo run --example=dump_ls\n```\n\nWindows:\n\n```powershell\n$env:PATH=\"C:\\Program Files\\IDA Professional 9.2;$env:PATH\"\n$env:IDADIR=\"C:\\Program Files\\IDA Professional 9.2\"\n\ncargo run --example=dump_ls\n```\n\n### Linking\n\nThe `idalib-build` crate provides various build script helpers to simplify\nlinking:\n\n- `idalib_build::configure_idalib_linkage`: links against `(lib)ida` and\n  `(lib)idalib` in the IDA installation directory.\n- `idalib_build::configure_idasdk_linkage`: links against the `(lib)ida` and\n  `(lib)idalib` stub libraries bundled with the SDK.\n- `idalib_build::configure_linkage`: links against the `(lib)ida` and\n  `(lib)idalib` stub libraries and for Linux/macOS sets the RPATH to refer to\n  the detected (or specified via `IDADIR`) installation directory.\n\n⚠️ Warning: If you copy the `build.rs` from `idalib/examples`, you may encounter\nunexpected behaviour when IDA is installed in a non-default location and\n`IDADIR` is not set, for example:\n\n```sh\nerror while loading shared libraries: [libida.so]\n```\n\nThis issue can be worked around by ensuring `IDADIR` is correctly set at build\ntime, or by ensuring the `(lib)ida` and `(lib)idalib` shared libraries are\navailable to the dynamic linker at runtime, e.g., via `LD_LIBRARY_PATH` or\n`/etc/ld.so.conf{,.d}`. Note that using the stub libraries provided by the SDK,\ne.g., those located at `$IDASDK/lib/...` as opposed to the\nlibraries in the IDA installation directory will result in\n[crashes](https://github.com/binarly-io/idalib/issues/24).\n\nFor users wanting to use the `build.rs` from `idalib/examples`, e.g., so builds\nsucceed via GitHub Actions without an IDA installation, we recommend using the\nfollowing `build.rs` which will help debug issues related to linking:\n\n```rust\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let (_, ida_path, idalib_path) = idalib_build::idalib_install_paths_with(false);\n    if !ida_path.exists() || !idalib_path.exists() {\n        println!(\"cargo::warning=IDA installation not found.\");\n        idalib_build::configure_idasdk_linkage();\n    } else {\n        idalib_build::configure_linkage()?;\n    }\n    Ok(())\n}\n```\n\nNote that for `idalib`-based tools being installed via\n[crates.io](https://crates.io), e.g.,\n[rhabdomancer](https://github.com/0xdea/rhabdomancer), the warning will only be\nvisible when installing with `cargo -vv`, as explained\nin [the cargo documentation](https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargo-warning):\n\n\u003e The warning instruction tells Cargo to display a warning after the build\n\u003e script has finished running. Warnings are only shown for path dependencies\n\u003e (that is, those you’re working on locally), so for example warnings printed\n\u003e out in crates.io crates are not emitted by default. The -vv “very verbose”\n\u003e flag may be used to have Cargo display warnings for all crates.\n\n## Extending idalib\n\nTo expose unimplemented IDA SDK functionality, modify the `idasdk-sys` crate,\nadd appropriate high-level wrappers in `idalib`, and submit a pull request.\nEnsure that the additions are portable and build with the latest SDK. We won't\naccept PRs to support older beta releases.\n\n⚠️ Warning: The IDA SDK submodule should be checked out prior to starting\ndevelopment, otherwise the build will fail, e.g.:\n\n```sh\ngit submodule update --init --recursive\n```\n\n## Contributors\n\nPlease see [CONTRIBUTORS.md](https://github.com/binarly-io/idalib/blob/master/CONTRIBUTORS.md) for a full list of\nacknowledgments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarly-io%2Fidalib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarly-io%2Fidalib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarly-io%2Fidalib/lists"}