pybind11-to-nanobind
Port a Python C++ extension's bindings from pybind11 to nanobind. Covers the mechanical API renames (NB_MODULE, def_rw/def_ro, python_error), the removed pybind11 features to design around (holders, py::array, multiple inheritance, module-local bindings), STL caster opt-in headers, custom __init__/type casters, the CMake nanobind_add_module build, and abi3/stable-ABI wheels. Use when asked to migrate to nanobind, cut binding compile time / binary size, or produce one abi3 wheel for a pybind11 extension.
Pinned to revision 0c51c24122b3, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/pybind11-to-nanobind/SKILL.md
- skills/pybind11-to-nanobind/AGENTS.md
- skills/pybind11-to-nanobind/README.md
- skills/pybind11-to-nanobind/reference/api-map.md
- skills/pybind11-to-nanobind/reference/example.md
Every link opens the file at its source, pinned to the revision this page describes.