Development - Contributing
Developing
Clone the repository and install it in a virtualenv in an editable mode with
the developers dependencies.
$ python -m venv env
$ source ./env/bin/activate
$ cd quokka
(env) $ pip install -e '.[dev]'
(env) $ python -c "import quokka; print(quokka.__version__)"
Format the code
The project uses the black formatter for the
Python code with the defaults settings.
Running Black
(env) $ black bindings/python/
The C++ code is formatted using clang-format.
Updating the Protobuf definition
To update the Protobuf definition, follow these steps:
- <!> IMPORTANT <!> Open an issue on the official repository
- Update the
proto/quokka.protofile with the new fields - Increase the version number in
CMakeLists.txtby: - A major version if the change breaks backward compatibility
- A minor version otherwise
- Write the exporter code (IDA and/or Ghidra)
- Update the python bindings accordingly
- Update the
__version__inbindings/python/quokka/version.pyto match the one in step 3. - Regenerate the protobuf Python bindings by reinstalling:
pip install -e .
Add a new IDA Version / SDK
Add an image with the new IDA Version
For example, using Version 7.7:
- Go to
ci - Copy installer to
ci/ida77/ida.run - (Optional) Copy
~/.idapro/ida.regtoci/ida77/ida.reg - (Optional) Add the installation password in a file to remember it for next time
- Build the image
$ docker build --file build.dockerfile \ --build-arg IDA_DIRECTORY=ida77 \ --build-arg IDA_PASSWORD=<install password> \ . - (Optional). If you did not copy a
ida.regfile, you should run the container first, open IDA (/opt/ida/idat64), accept the license and save the container (usingdocker commit).
Add the SDK in the repo
For IDA >= 9.2, the SDK is open source
and fetched automatically by CMake via -DIDA_VERSION=<major>.<minor>.
Other tips and tricks
Read the Dev's Tips & Tricks page!