Building Documentation¶
CLA¶
To contribute to the Binary Ninja documentation, first sign the contribution license agreement and send it to Vector 35.
Prerequisites¶
The Python documentation tools are managed with poetry. Building every documentation surface requires:
- Python 3.10 or newer and poetry.
- Doxygen 1.12 or newer available on
PATHfor the C++ API reference. - A matching Binary Ninja installation whose
binaryninjaPython module can be imported. The API revision must match the installation'sapi_REVISION.txt.
poetry install installs zensical, sphinx, and breathe. It does not install Doxygen or Binary Ninja.
Building¶
git clone https://github.com/Vector35/binaryninja-api/
cd binaryninja-api
poetry install
poetry run python scripts/zensical_build.py
echo User documentation available in site/
cd api-docs
poetry run make html
echo Python API documentation available in build/html
cd cppdocs
poetry run make html
echo C++ API documentation available in html/
scripts/zensical_build.py runs zensical build and then writes the redirect stubs described by [project.plugins.redirects.redirect_maps] in zensical.toml.
Changing¶
Changing documentation for the API itself is fairly straightforward. Use doxygen style comment blocks in C++ and C, and restructured text blocks for python for the source. The user documentation is located in the docs/ folder and the API documentation is generated from the config in the api-docs folder.
Tip
When updating user documentation, the poetry run zensical serve feature is particularly helpful for live previews.