Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
abi="cp$(echo '${{ matrix.python-version }}' | tr -d .)"
conda install --quiet --yes \
"python_abi=${{ matrix.python-version }}=*_$abi" \
compilers pybind11 numpy setuptools pytest cmake ninja libhwy
compilers nanobind numpy setuptools pytest cmake ninja libhwy
python tools/build_openjph.py
python -m pip install -e . -vvv --no-deps --no-build-isolation --disable-pip-version-check
python --version
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
# See the Unix step: pin the GIL-enabled ABI so the interpreter under
# test matches the job name.
$abi = "cp" + "${{ matrix.python-version }}".Replace(".", "")
conda install --yes --quiet "python_abi=${{ matrix.python-version }}=*_$abi" compilers pybind11 numpy setuptools pytest git cmake ninja libhwy
conda install --yes --quiet "python_abi=${{ matrix.python-version }}=*_$abi" compilers nanobind numpy setuptools pytest git cmake ninja libhwy
python tools/build_openjph.py
python -m pip install -e . -vvv --no-deps --no-build-isolation --disable-pip-version-check
python --version
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
abi="cp$(echo '${{ matrix.python-version }}' | tr -d .)t"
conda install --quiet --yes \
"python_abi=${{ matrix.python-version }}=*_$abi" \
compilers pybind11 numpy setuptools pytest cmake ninja libhwy
compilers nanobind numpy setuptools pytest cmake ninja libhwy
conda list
python tools/build_openjph.py
python -m pip install -e . -vvv --no-deps --no-build-isolation --disable-pip-version-check
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.1] - 2026-08-08

- Port the extension from pybind11 to
[nanobind](https://github.com/wjakob/nanobind). Binding-layer call
overhead drops ~2.5× (≈240 → ≈100 ns per call), which is invisible in
end-to-end encode/decode times (the codec dominates by 3–4 orders of
magnitude) but keeps the wrapper on the actively developed binding
framework. Behavior is unchanged: all tests pass, including the
free-threaded (3.13t/3.14t) suite — nanobind declares the module
GIL-free when built against a free-threaded CPython. Building from
source now requires `nanobind >= 2.2` instead of `pybind11`.

## [0.10.0] - 2026-08-08

- Add `wavelet=` to `imwrite` / `imwrite_to_memory`, accepting `'irv97'`,
Expand Down
7 changes: 7 additions & 0 deletions ojph/nanobind_support.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Compiles nanobind's support library into this extension. nanobind is not a
// header-only library: its type/function machinery lives in a set of .cpp
// files that are normally built by its CMake integration. Building through
// setuptools instead, this shim pulls the amalgamated source in from the
// installed nanobind package (setup.py puts nanobind's src/ directory on the
// include path).
#include <nb_combined.cpp>
Loading
Loading