Miguel Ojeda
Miguel Ojeda
It is up to the maintainers (I don't really know what they would prefer or their policies! :) -- I added that comment mainly because I was surprised by all...
What is the type generated in functions receiving/returning each kind of `enum` in the examples? I am asking since the idea was to avoid UB (so we need the wider...
When you say "usages in the API", do you mean using the `Result` in the generated function declarations by `bindgen`? If so, do your C APIs return the `enum` type...
So your `XXX_Get_Value` returns `enum MY_C_ERRORCODE` rather than something like `int`, right? That should work then, since `bindgen` can map it (and if I understand correctly, with `result_ffi_guarantees` landed, it...
> I assume that not all the time will be the one that's equal to zero as some folks don't even bother putting values on their enums. `enum`s start at...
The proposed `[[safe]]` attribute did not get enough support from the committee back then, but lately memory safety is talked about more in WG14 and is in the latest charter,...
Yeah, as far as I can see, the lint is not enabled by default (`rust_2024_compatibility` or `missing_unsafe_on_extern`) but it can be used starting with 1.82 even for 2015, so it...
You are correct that parts of the process could be further automated by tooling, possibly aiding it with extra information on the C header file. In Rust for Linux we...
We are well aware there is a lot of missing information in the C headers and, as I mentioned in my previous reply, it would be great to add more...