Is your feature request related to a problem? Please describe.
Drake's pydrake bindings layer is a pain point in various ways:
Must rebuild for every single python minor version we support.
Slow compile times.
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 https://github.com/pypi/support/issues/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.
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 https://github.com/pypi/support/issues/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 https://github.com/RobotLocomotion/drake/pull/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
.