Hello!
I’ve been trying to add microui as a dependency for my project. I initially tried to zig fetch --save … as I normally do, but because it’s missing a build.zig.zon file in it’s root that doesn’t work. I can think of a few ways to go about this but they all feel wrong:
- fork it and add a build.zig.zon file, fetch the fork instead
- feels the most “correct” but means I’m left maintaining it somehow. That’s not as hard as I’m making it out to be but it’s still uncomfortable
- fetch without
--saveat build time (like discussed here)- easily takes the most work of any of these options, and only seems to be worth doing in very odd circumstances
- add it as a git submodule
- I’d do this for a C/C++ project, but only as a “least bad” option. It’s worse here because deps would be split between build.zig.zon and .gitmodules
- add it to a vendor directory
- probably what I’ll do in the absence of any advice because it’s the easiest, but this incurs some of the maintenance issues of forking while also throwing out any tooling to handle dependencies
- make it a system dependency
- means that others (or future me) will have to go through extra steps for
zig buildto work
- means that others (or future me) will have to go through extra steps for
This feels like it should be pretty easy considering zig/c interop has generally felt nice, so I’m mildly embarrassed that I can’t figure this out.