-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
rust: Proper support for cbindgen #13092
Comments
@dwlsalmeida and I had been talking about this a while back, and I have some work on this. I pushed the work I have, which is not completed. Let me have a look at what's in Mesa and we'll go from there |
I asked them to add support for Make compatible depfiles, and it was added, so with more recent versions of cbindgen this isn't a problem, cbindgen will tell Ninja about any files it consumes, and Ninja will do the right thing. |
This is pretty minimal, but does work at least for basic tests. TODO: - needs docs - needs release snippet - more? Fixes: mesonbuild#13092
Okay, I opened a Draft PR with what I have cleaned up a little bit. I've also checked this with Mesa, and it seems to work for the one case there so far. |
This is pretty minimal, but does work at least for basic tests. TODO: - needs docs - needs release snippet - more? Fixes: mesonbuild#13092
This is pretty minimal, but does work at least for basic tests. TODO: - needs docs - needs release snippet - more? Fixes: mesonbuild#13092
We currently have a very handy built-in wrapper for bindgen:
We don't have anything similar for cbindgen. Currently in Mesa, we're invoking it directly via
custom_target()
and that works okay but it's a bit clunky:It seems to be very much designed to be run from cargo but it is possible to invoke from Meson with some work. Probably the biggiest annoyance is that we have to list every Rust file in the meson instead of just invoking it on
lib.rs
and letting it go. That could probably be wrapped by Meson for us.I don't have a particular proposal for what I want
rust.cbindgen()
to look like but I think we can do better than us having to list a bunch of rust files.The text was updated successfully, but these errors were encountered: