Switch pydrake bindings from pybind11 to nanobind #21572
Labels
component: build system
Bazel, CMake, dependencies, memory checkers, linters
priority: medium
type: feature request
Is your feature request related to a problem? Please describe.
Drake's pydrake bindings layer is a pain point in various ways:
The former is annoying not only for build times, but also because it takes up way more space on PyPI per release, which leads to things like pypi/support#3226 where we burn through our quota 3-4x faster than we should be doing. Ideally, our bindings library should support Python's Stable API, also know as
abi3
.Describe the solution you'd like
Port pydrake to use nanobind instead of pybind11.
Describe alternatives you've considered
There are various other pybind11-inspired bindings libraries, but none of them seem to support
abi3
.Additional context
My current thinking is that the first step should be #19250, i.e., removing all of Drake's customization of
pybind11
. After that, we can follow https://nanobind.readthedocs.io/en/latest/porting.html to move from vanillapybind11
tonanobind
.The text was updated successfully, but these errors were encountered: