Skip to content

Conversation

@clubby789
Copy link

This adds -DBINEXPORT_BINARYNINJA_LATEST=ON to build against the latest available API.
Additionally, this PR updates the stable/dev pinned versions and stubs.

This fixes #120 and #108

@clubby789
Copy link
Author

Now uses add_custom_command so we only need to run the stub generator once. Added a PS1 script that does the equivalent of the current bash one. I don't have a Windows install available, but running using pwsh this generates exactly the same output.

@WhatTheFuzz
Copy link

WhatTheFuzz commented Oct 3, 2024

Thanks for the PR. I spent way too long trying to modify the project to work with the latest Binja API. Can confirm this PR works with the dev channel (at the time of writing 4.2.6146-dev (d7e28a65)) on macOS arm64.

@0ptyx
Copy link

0ptyx commented Mar 13, 2025

any chance we can get some movement on this please?

also fwiw, i was able to get this to work with BinaryNinja on dev but not on stable because the build is pinned to the commit hash and you end up getting the same abi out of date error. i don't know how sustainable using a hash is since bn releases pretty fast. perhaps using a target branch that always points to the most current stable release, and/or a way to specify the branch/tag to use. it may also be safer to run the regenerate-stubs on every build since the apis changed from 4.1 to 4.2.

@clubby789
Copy link
Author

I updated the pinned commits for stable and dev

i don't know how sustainable using a hash is since bn releases pretty fast

iiuc, this is a design choice so that whatever is pinned is known-good (and you can easily downgrade your BN if needed). Maybe BINEXPORT_BINARYNINJA_LATEST could be refactored to accept any commit/branch/tag?

@clubby789
Copy link
Author

Sorry for the ping @cblichmann - can I ask for a follow up review now the previous comments have been addressed?

@clubby789
Copy link
Author

Unsure if this is still needed with Vector35/binaryninja-api#6852 (comment)

@cblichmann
Copy link
Member

Yes, Binary Ninja now ships with BinExport, making this much easier.

@cblichmann cblichmann added the enhancement New feature or request label Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automatically regenerate_api_stubs when building for BN

4 participants