unicorn-engine / unicorn

Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
http://www.unicorn-engine.org
GNU General Public License v2.0
7.53k stars 1.33k forks source link

rust: expose ffi #1821

Closed lockbox closed 1 year ago

lockbox commented 1 year ago

the unicorn rust ffi is too high level for much customization, to enable an "opt-in" choice to more flexibility the ffi module should get re-exported public since there is no unicorn-sys create or equivalent etc.

wtdcode commented 1 year ago

Could you elaborate on your use case? I have the same thoughts for quite a long time.

lockbox commented 1 year ago

What i did in https://github.com/lockbox/unicorn was expose the ffi layer. this allows you to make your own callbacks and pass custom user data a la ffi::uc_hook_add. My use case is wrapping unicorn with some tlc.

wtdcode commented 1 year ago

Okay, make sense. I'm actually writing some raw wrapper for these but still WIP... Mark as enhancement.

lockbox commented 1 year ago

Cool! My changes I made work for me but are still a bit clunky. Looking forward to the changes

lockbox commented 1 year ago

Closed in #1847