Files
jak-project/third-party/capstone/bindings/python/BUILDING.md
T
Tyler Wilding bfc4c18ada goalc: replicate tests for the majority of ARM64 non-simd cases (#4377)
- Adds `capstone` as a disassembling library that could eventually
replace Zydis (for now left that alone)
- Replicates all of the existing x86 tests to ARM64, fixed a bunch of
underlying issues along the way
- There are a very small handful of tests remaining that need to be
enabled / fixed
2026-08-16 15:34:37 -04:00

1.2 KiB
Vendored
Generated

  1. This documentation explains how to install the Python bindings for Capstone from source. If you want to install it from a PyPi package (recommended if you are on Windows), see README.md.

  2. To install Capstone and the Python bindings on *nix, run the command below:

pip install bindings/python/
  1. Building cstest_py

To run the disassembler tests you can install cstest_py as alternative to the normal cstest. In contrast to cstest, cstest_py also runs on Windows and Mac.

Install with:

pip install bindings/python/cstest_py/

It requires the bindings of course.

  1. The tests directory contains some test code to show how to use the Capstone API.
  • test_lite.py Similarly to test_basic.py, but this code shows how to use disasm_lite(), a lighter method to disassemble binary. Unlike disasm() API (used by test_basic.py), which returns CsInsn objects, this API just returns tuples of (address, size, mnemonic, op_str).

    The main reason for using this API is better performance: disasm_lite() is at least 20% faster than disasm(). Memory usage is also less. So if you just need basic information out of disassembler, use disasm_lite() instead of disasm().