8000 Refactor unicornlib to use pybind11 by twizmwazin · Pull Request #5516 · angr/angr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor unicornlib to use pybind11 #5516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

twizmwazin
Copy link
Member

No description provided.

@ltfish
Copy link
Member
ltfish commented Jun 5, 2025

Can we use nanobind instead?

@ltfish
Copy link
Member
ltfish commented Jun 5, 2025

(We already use nanobind in pypcode)

@twizmwazin
Copy link
Member Author

I chose pybind11 because it cleanly integrates with setuptools, allowing us to get rid of most of the custom logic in setup.py. Nanobind doesn't seem to offer that, and instead requires integrating cmake.

@twizmwazin twizmwazin force-pushed the feat/unicornlib-pybind branch from ebbe77f to cfab23b Compare June 5, 2025 01:17
@twizmwazin twizmwazin force-pushed the feat/unicornlib-pybind branch from 20c7aca to 312e23c Compare June 5, 2025 01:33
@ltfish
Copy link
Member
ltfish commented Jun 5, 2025

allowing us to get rid of most of the custom logic in setup.py

Let's discuss this offline. Given that the long-term goal being switching to P-Code and the fact that pypcode already uses nanobind, I don't think relying on CMake is a worse idea than the current situation. Personally I do not see pybind11 removing the performance overhead any time soon, and nanobind offers solid runtime performance boosts over pybind11, which is critical for the unicorn engine.

@ltfish
Copy link
Member
ltfish commented Jun 5, 2025

Also translating nanobind and pybind11 code in between is almost trivial.

@rhelmot
8BEB
Copy link
Member
rhelmot commented Jun 9, 2025

Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/angr_5516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0