On 3/14/22 2:11 PM, Steven Schveighoffer wrote:
>But as a D developer, using an actual C library gets quite annoying. You deal with it because it's what's available. But if I can add niceties to it, I'd rather do that.
One possible usage of ImportC which I just thought of, would be to statically verify the raylib binding you have is compatible with the raylib source.
So you build against raylib, including the .h file, and then you introspect all the functions/types in your raylib-d binding and the raylib c header, and if there are any mismatches, you report those.
I would absolutely accept such a verification system as a PR to raylib-d! I did plant a seed in raylib that for the next released version, I can verify at runtime that you are bound to the correct version of the library -- that was accepted by Ray.
-Steve