You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project started as a small collection of macros for nanobind in Bazel, heavily borrowing from pybind11-bazel and its macros.
Some design differences and changes from nanobind (most notably, the library part and the stable ABI facilities) have made it necessary to expose a number of feature flags to fully take advantage of nanobind's configurability.
Unfortunately, the combination of different features (SABI versions, target platforms, build mode, now free-threading coming up) have lead to a combinatorial explosion of config options in nanobind-bazel.
I'm not sure how many people inspect the Bazel graph on the daily, but I imagine nanobind-bazel's to look pretty horrifically cluttered.
What would be a better solution is to rewrite the macros as rules with proper Starlark implementations, where you can (if I'm not mistaken) get a flag's value, and proceed to do different things with if statements based on the obtained values.
This would also make it easier to just ignore certain ill-formed combinations, e.g. SABI builds with Python versions <3.12. It would also help to not produce two .so build artifacts in the SABI case, one of which is completely unused.
The text was updated successfully, but these errors were encountered:
This project started as a small collection of macros for nanobind in Bazel, heavily borrowing from pybind11-bazel and its macros.
Some design differences and changes from nanobind (most notably, the library part and the stable ABI facilities) have made it necessary to expose a number of feature flags to fully take advantage of nanobind's configurability.
Unfortunately, the combination of different features (SABI versions, target platforms, build mode, now free-threading coming up) have lead to a combinatorial explosion of config options in nanobind-bazel.
I'm not sure how many people inspect the Bazel graph on the daily, but I imagine nanobind-bazel's to look pretty horrifically cluttered.
What would be a better solution is to rewrite the macros as rules with proper Starlark implementations, where you can (if I'm not mistaken) get a flag's value, and proceed to do different things with if statements based on the obtained values.
This would also make it easier to just ignore certain ill-formed combinations, e.g. SABI builds with Python versions <3.12. It would also help to not produce two .so build artifacts in the SABI case, one of which is completely unused.
The text was updated successfully, but these errors were encountered: