So far I have used the zig book and the openmymind websites, to learn zig. I realized, that reading someone else’s code is a great help in learning, but these sites are teaching the language, and not the bigger picture.
Therefor, I struggle with breaking my code into several files, or smaller yet better reusable functions/structs etc. The code bases I found available (like ghostty or floooh/sokol-zig) are just too advanced for me. Does anyone know some simpler code bases, that are good as well? I don’t have the experience to judge them.
I would link you my own code base, but I’m probably too biased about the quality of my code.
I do however want to point at the standard library. It’s not only a way to find out about different ways to structure your code, but it also offers you a deeper understanding of the functions you use every day. (And unlike other programming languages, the standard library is actually readable).
I understand exactly what you’re saying, and I’ve done the same as you.
check out my zig_sqlite project, it’s in progress, but you’ll get lots of tips, how to make a library, how to process a string or digital, etc.
It’s not perfect, I still have improvements to make and tests to run.