nanobind: tiny and efficient C++/Python bindings
Project Links
Meta
Author: Wenzel Jakob
Classifiers
Intended Audience
- Developers
License
- OSI Approved :: BSD License
Programming Language
- C++
- Python :: 3 :: Only
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
Topic
- Software Development :: Libraries :: Python Modules
- Utilities
nanobind is a small binding library that exposes C++ types in Python and vice versa. It is reminiscent of Boost.Python and pybind11 and uses near-identical syntax. In contrast to these existing tools, nanobind is more efficient: bindings compile in a shorter amount of time, produce smaller binaries, and have better runtime performance.
More concretely, benchmarks show up to ~4× faster compile time, ~5× smaller binaries, and ~10× lower runtime overheads compared to pybind11. nanobind also outperforms Cython in important metrics (3-12× binary size reduction, 1.6-4× compilation time reduction, similar runtime performance).
Please see the following links for tutorial and reference documentation in HTML and PDF formats.
Sep 04, 2025
2.9.2
Sep 04, 2025
2.9.1
Sep 04, 2025
2.9.0
Jul 16, 2025
2.8.0
Apr 18, 2025
2.7.0
Mar 28, 2025
2.6.1
Mar 28, 2025
2.6.0
Feb 02, 2025
2.5.0
Dec 05, 2024
2.4.0
Oct 03, 2024
2.2.0
Aug 11, 2024
2.1.0
May 23, 2024
2.0.0
Feb 23, 2024
1.9.2
Nov 02, 2023
1.8.0
Oct 18, 2023
1.7.0
Oct 03, 2023
1.6.2
Oct 02, 2023
1.6.1
Oct 02, 2023
1.6.0
Aug 24, 2023
1.5.2
Aug 23, 2023
1.5.1
Aug 07, 2023
1.5.0
Jun 08, 2023
1.4.0
Jun 02, 2023
1.3.2
May 31, 2023
1.3.1
May 31, 2023
1.3.0
Apr 24, 2023
1.2.0
Apr 06, 2023
1.1.1
Apr 05, 2023
1.1.0
Mar 28, 2023
1.0.0
Mar 08, 2023
0.3.1
Mar 08, 2023
0.3.0
Mar 03, 2023
0.2.0
Jan 03, 2023
0.1.0
Nov 23, 2022
0.0.9
Oct 27, 2022
0.0.8
Oct 14, 2022
0.0.7
Oct 14, 2022
0.0.6
May 13, 2022
0.0.5
May 13, 2022
0.0.4
Apr 14, 2022
0.0.3
Mar 10, 2022
0.0.2
Feb 20, 2022
0.0.1
Wheel compatibility matrix
Files in release
No dependencies