-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for cc_library targets that depend on Nanobind, without nanobind_library
.
#48
Comments
What is the problem with multiple If you "just" want a way to override the This would (if I understand correctly) result in a |
The problem is that if you rely on a wrapper rule, only one library can be the "wrapper". I want to write
and not use |
Okay. So how can I help you in this instance? If you can't use the If it's just about forwarding nanobind to, say, (Based on what I currently know, I think I could create a module extension containing |
Well, I do want to use |
FWIW, I think both should be on the agenda (there is an open issue already for custom nanobind targets). But reading https://bazel.build/external/extension#extension_usage, I'm wondering if you did just the intended thing by loading in the module extension yourself, like mentioned in these docs. The problem would come when I'm guessing the fix is that you use the extension first, and then pass your "custom" nanobind into your |
#49 has landed with an alias declaration of the internal |
Currently
nanobind_bazel
exposes ananobind_library
bazel macro that wrapscc_library
with nanobind deps and copts. But this isn't a compositional way to do it: if I had acc_library
that depended on two such libraries, then I cannot usenanobind_library
.I'm attempting to opensource a package that does something like this, but I found I needed access to the underlying
@nanobind
target to do this, i.e., I had to add the following to myMODULE.bazel
, which seems like a layering violation:Can we expose
@nanobind
directly to users?The text was updated successfully, but these errors were encountered: