Skip to content

Latest commit

 

History

History
139 lines (103 loc) · 3.2 KB

index.rst

File metadata and controls

139 lines (103 loc) · 3.2 KB

Introduction

not latex

nanobind logo

nanobind logo

latex

nanobind logo

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 <benchmarks> show ~2-3× faster compile time, ~3× smaller binaries, and up to ~8× lower runtime overheads compared to pybind11.

not latex

Documentation formats

You are reading the HTML version of the documentation. An alternative PDF version is also available.

Dependencies

latex

Dependencies

nanobinds depends on

  • Python 3.8+ or PyPy 7.3.10+ (the 3.8 and 3.9 PyPy flavors are supported, though there are some limitations <pypy_issues>).
  • CMake 3.15+.
  • A C++17 compiler: Clang 7+, GCC 8+, and MSVC2019+ are officially supported. Others (MinGW, Intel, NVIDIA, ..) may work as well but will not receive support.

not latex

How to cite this project?

latex

How to cite this project?

Please use the following BibTeX template to cite nanobind in scientific discourse:

@misc{nanobind,
   author = {Wenzel Jakob},
   year = {2022},
   note = {https://github.com/wjakob/nanobind},
   title = {nanobind---Seamless operability between C++17 and Python}
}

The nanobind logo was designed by AndoTwin Studio. High-resolution version are available here (light) and here (dark).

not latex

Table of contents

changelog why benchmark porting faq

installing building basics

exchanging ownership functions classes exceptions ndarray_index packaging

ownership_adv lowlevel typeslots

api_core api_extra api_cmake