First steps with zig 0.17

I’ve started learning Zig and decided to try my first vulkan triangle.

I have too many ideas and told myself let’s just find a hello world triangle and build on top but I couldn’t get anything I found to compile for 0.17 :laughing: so I thought why not just do it myself?

I’m working towards learning systems programming, Vulkan and GPU compute, so I’m starting with the fundamentals and building from there.

Still very early in the journey, but looking forward to learning the language and getting involved in the community.
Any tips for someone starting with Zig 0.17 are welcome!

You can check out the repo here.

I do not think you want to commit .zig-cache, zig-out and zig-pkg into repo.

1 Like

I mean zig-pkg could work as a vendoring idea though does it not?
I do agree for .zig-cache and zig-out as they don’t belong on git.

I’m pretty sure zig puts the commit hashes in the build.zig.zon anyways, and will fetch it automatically

1 Like

What’s the reason?

.zig-cache and zig-out will be generated by the compiler, depend only on your source code and are mostly binary files. Also .zig-cache can grow quite large(especially since garbage collection isn’t implemented yet afaik).

zig-pkg is for third party dependencies. You can either commit it such that you can always work on your project if you can clone the repo. Or you don’t commit it which reduces the size of the repo but makes it possible that you can’t compile the project if for instance Github is down again.

1 Like

Okay I see.. Yeah I literally put it together and wanted it to be cloned and working without any configuration gymnastics so someone like me could clone it and jump straight into whatever they needed to do.