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
Here cuda 11.4 .. cuda 12.8 for instance. This was done previously by generating a binding for each library, and manually import various files with feature flags.
In this PR: coreylowman/cudarc#366 I implemented something that would take various bindgen created binding files, and fuse them into a single file where every symbol is marked with the feature gating which vastly reduces the amount of code generated in the end.
While writing it, I thought maybe it could become something useful more generally for the bindgen community since I took quite a bit of code from bindgen to write it.
Do you think it's something interesting ?
I could try to look up how to implement if there's enough interest.
I'm doing something quite similar with a patch in my fork of bindgen, which adds a bindgen callback to add attributes based on documentation comments (callback code, bindgen patch). The generated bindings than have feature guards (example).
Upstreaming support for adding custom cfg guards would definitly be interesting to me.
@jschwe has done some great prior work. I was doing attribute related work in #3088 but it seems dead on arrival. You want to perhaps band together and work on an improved version (fork)?
rust-lang seems to be overwhelmed with other work right now and not pay enough attention to this project.—Rich
P.S.: Contact via info@pacemtechnologies.com—"Re: rust-bindgen contribution" if anyone is interested to more actively work on a bindgen fork/"v2". The project has grown quite convoluted and hard to maintain imo. Many low hanging fruits we can get done quickly and send in a single version for review in the end; this way we can get the project back into the rust-lang organization with great improvements; just an idea.
Hi
For https://github.com/coreylowman/cudarc there was a need to support multiple versions of cuda C library.
Here
cuda 11.4 .. cuda 12.8
for instance. This was done previously by generating a binding for each library, and manually import various files with feature flags.In this PR: coreylowman/cudarc#366 I implemented something that would take various bindgen created binding files, and fuse them into a single file where every symbol is marked with the feature gating which vastly reduces the amount of code generated in the end.
While writing it, I thought maybe it could become something useful more generally for the bindgen community since I took quite a bit of code from bindgen to write it.
Do you think it's something interesting ?
I could try to look up how to implement if there's enough interest.
For a for visual show:
From
To
The text was updated successfully, but these errors were encountered: