Prototype nanobind bindings for Imath
We have the long term goal of removing the dependency on Boost.Python, and the current strategy is to rewrite the bindings with pybind11, although nanobind promises to be even better than pybind11, and also claims to be largely API-compatible.
We should prototype bindings using nanobind. This would involve duplicating the current state of the pybind11 bindings, both source and CMake configuration, and replacing both to use nanobind.
I'll take a shot at implementing this for Dev Days next week.
This turns out to be more complex than originally thought, as it has implications for downstream projects, like Alembic, since nanobind and pybind11 don't appear to work together in the ecosystem.
OpenVDB has already switched to nanobind. I think MaterialX is also seriously considering it. I think we're already past the point of being able to talk about the merits of all these interconnected projects staying on one or the other or coordinating a switch at the same time.
At this point we should finish off the pybind11 bindings.
After that is done how much work is it to transition from pybind11 to nanobind?
Our previous concerns with jumping on nanobind was with the minimum supported python version, since then most or all DCCs are on a new enough version of python that this is no longer a concern.
Also, is nanobind still the way to go or is there a new picobind or even yoctobind that we should be looking into? 😃
Definitely finish pybind11 first. I believe nanobind is only possible when we raise our Python minimum to 3.9 (or is it 3.8?).