Suggestions for interop with C libraries

I’m looking to write something simple pulling in a few specific libraries. this is mostly for educational purposes so i don’t want to use bindings directly. though i am open to suggestions to look at the source code of existing zig bindings which already make good use of c interop, or anything related to that. I’m trying to integrate at least glfw, freetype, and sqlite3 into one program. also good would be some other libraries like openssl and curl. I need a good boilerplate so it will be easy to swap out libraries in the future for different projects. also some guidance on how to use the build system to optimize this process would be great. anything useful will be good. I just need enough code to be able to implement some of the main functions in the libraries, but i want to do that in the best way possible, again while making good use of the build system.

1 Like

I think for learning purposes this would be good.

1 Like