# To path dependency or not

**URL:** <https://ziggit.dev/t/to-path-dependency-or-not/18121>\
**Category:** Help\
**Tags:** build-system\
**Created:** [October 27, 2026, 6:37pm UTC](https://ziggit.dev/t/to-path-dependency-or-not/18121 "2026-10-27T18:37:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffective](https://ziggit.dev/user_avatar/ziggit.dev/jeffective/32/3116_2.png) [@jeffective](https://ziggit.dev/u/jeffective)\
**Post date:** [October 27, 2026, 6:37pm UTC](https://ziggit.dev/t/to-path-dependency-or-not/18121/1 "2026-10-27T18:37:46Z")

</div>

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:

1. 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](https://github.com/ZigEmbeddedGroup/microzig)
2. don’t use path dependency and just add more to your root build.zig.zon.

---

<div class="post-metadata">

**Author:** ![Southporter](https://ziggit.dev/user_avatar/ziggit.dev/southporter/32/2500_2.png) [@Southporter](https://ziggit.dev/u/Southporter)\
**Post date:** [October 27, 2026, 7:10pm UTC](https://ziggit.dev/t/to-path-dependency-or-not/18121/2 "2026-10-27T19:10:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![castholm](https://ziggit.dev/user_avatar/ziggit.dev/castholm/32/1330_2.png) [@castholm](https://ziggit.dev/u/castholm)\
**Post date:** [October 27, 2026, 7:15pm UTC](https://ziggit.dev/t/to-path-dependency-or-not/18121/3 "2026-10-27T19:15:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeffective](https://ziggit.dev/user_avatar/ziggit.dev/jeffective/32/3116_2.png) [@jeffective](https://ziggit.dev/u/jeffective)\
**Post date:** [October 28, 2026, 7:42pm UTC](https://ziggit.dev/t/to-path-dependency-or-not/18121/4 "2026-10-28T19:42:18Z")

</div>

Im also not familiar with how to call steps in a path dependency, if you want to runs the tests for a path dep.
