Consider a module that wraps a C library. To wrap this c lib you add the c sources as a tarball to build.zig.zon.
How do you choose between doing the following:
- introduce a path dependency in the root build.zig.zon to a subfolder that has its own build.zig and build.zig.zon that creates this c library wrapper. The path dependency thus has a minimal build.zig.zon. An example of this strategy is microzig
- don’t use path dependency and just add more to your root build.zig.zon.
For me, it would depend on how I hope for it to be used. If it’s just for my project, I would go with #2. This is the most straightforward approach.
If you are hoping for others to be able to use it, or to potentiall break it out into separate place (i.e. AYCB), then I would go with #1.
Do you have a good technical reason to do the more complicated thing?
If your answer is “no” or “I don’t know”, then do the simple thing.
Im also not familiar with how to call steps in a path dependency, if you want to runs the tests for a path dep.