Hi, I’ve actually just started assembling a slick Zig project template that I’ve been reusing for both library and executable projects! The library version will have examples like you’re requesting, but, in the meantime, here you go:
You can run all your examples by doing zig build example or just zig build because the “example” step depends on the main one (last line of the build function).
This is great - I was looking for some examples of this too.
Hey @tensorush, would you consider writing some Docs around the build system? We’ve been kicking around that idea for a while but it looks like you’ve really gotten deep into it. I think a lot of people could benefit from some Docs on this subject.
Yeah, sure! I definitely haven’t used every build system trick, but I kinda know the basics and I’d love to figure out more. I’ll start it today then.
This would be fantastic. I would personally love a doc along the lines of “conceptual / concrete migration from Makefiles to zig’s build system” – this is how my mind models a build system.
This is just a suggestion; anything you can come up will be welcome!