Question: beginner question on why this lib exists?
Opened this issue · 2 comments
Hello,
I’m currently looking into building a zig-based game using SDL.
I know that you can import the C code directly using Zigs awesome understanding of C/C++ source code but I’m curious why this library of bindings exists and why you’d want to use it?
I’m only asking because this lib seems very convenient to hide the C complexity away and the possible casting that would need to happen back and forth between the world of zig and C.
Am I on the right track on why using this would be useful?
Thanks for your time!
Yes, this library exists to have more precise type mappings for Zig. SDL has documentation that talks about the allowed values for APIs, but C cannot reflect that functions expect arrays of N items for example. We can model such behaviour with Zig
That makes perfect sense. Thanks for the explanation! Feel free to close.