Installation
The bindings are distributed as a prebuilt binary wheel. Install with
pip, or with your lockfile manager of choice
(uv, poetry,
pdm):
pip install big-code-analysis
Python >=3.12 is required. The compiled extension uses CPython’s
stable abi3 surface
(abi3-py312), so one wheel covers 3.12, 3.13, 3.14, and every
future minor release without a per-version wheel build.
Wheel matrix
CI publishes wheels for the following targets today. If your platform is not listed, build from source.
| Platform | Architectures |
|---|---|
Linux (manylinux_2_28) | x86_64, aarch64 |
The wheel matrix is defined in
.github/workflows/python-wheels.yml.
manylinux_2_28 requires glibc
>= 2.28 (RHEL 8 / Debian 10 / Ubuntu 18.10 and newer); older
distributions (RHEL 7 / CentOS 7, glibc 2.17) need to build from
source. macOS and Windows wheels are not yet shipped, so pip install
on those platforms falls back to a source build today.
Verifying the install
python -c "import big_code_analysis as bca; print(bca.__version__)"
The printed version equals
[workspace.package].version
in the Rust workspace’s Cargo.toml. The bindings and Rust library
share a version.
Building from source
If no wheel matches your platform, or you want to bind against an unreleased Rust commit, build with maturin:
git clone https://github.com/dekobon/big-code-analysis.git
cd big-code-analysis/big-code-analysis-py
python -m venv .venv && source .venv/bin/activate
pip install --upgrade pip
pip install "maturin>=1.7,<2.0"
maturin develop --release # editable install of big_code_analysis
python -c "import big_code_analysis as bca; print(bca.__version__)"
maturin develop builds the Rust extension in place and installs it
into the active venv so import big_code_analysis resolves locally;
no separate pip install -e . step is required. The --release flag
turns on the optimiser; omit it during development for faster
rebuilds.
You also need:
- A stable Rust toolchain (MSRV:
1.94). Install via rustup. - A C compiler (used by the tree-sitter grammar crates).
- CPython development headers (
python3-devon Debian / Ubuntu).
Next
Walk through the quick-start to compute your first metric, or skip ahead to batch processing if you are wiring this into a pipeline over many files.