rizinorg / rz-pipe

Access rizin via pipe from any programming language!
33 stars 11 forks source link

Improvement on rzpipe api and cutter #2

Closed ZorD1 closed 1 year ago

ZorD1 commented 3 years ago

Hello I would like to make a change in rzpipe. Radare2 has been improving r2pipe for some time now. This project is https://github.com/radare/radare2-r2pipe-api. If possible I would like it to be implemented in rzpipe as much as in cutter so that it creates a high level API, abstracting the rizin commands with a human friendly taste.

wargio commented 3 years ago

You are more than welcome to do this! it's definitely a great idea

XVilka commented 3 years ago

While I understand the motivation behind this feature, I believe using rz-pipe as a middle layer between Rizin and some complex software would be a mistake. Rz-pipe is a good way to quickly make some small scripts but lacks the ability to control interaction with Rizin asynchronously - e.g. request information about current opcode while analysis still runs in the background, without giving up the control on interrupting the analysis. Moreover, there is no way to indicate the error and error reason if something goes wrong. Thus, I believe native bindings should be the foundation of this work, not the rz-pipe.

That being said, I understand the importance of the high-level API, and can help to build a Python native bindings that are resembling this API. We should evaluate the current API used in "radare2-pipe-api" and check the C API Rizin provides, find missing parts and implement it.

Regarding using it in Cutter - Cutter already uses Rizin C API directly, thus the proposal https://github.com/rizinorg/cutter/issues/1662 is very relevant to yours.

XVilka commented 1 year ago

For this purpose rz-bindgen fits better:

If something is missing there, please let us know and open an issue in the corresponding repository.