Fetching dependencies without build.zig.zon?

Yeah, totally! This is for personal consumption only, I’d recommend against this for anyone else. Dependencies which you can parse rather than compute are a huge deal and are a requirement for having a robust ecosystem of interdependent stuff.

For the reference, let me describe the specific use-case where I think I need what I need:

In TigerBeetle, we currently are shelling out to gh release download in a couple of places:

I’d love to avoid shelling out to gh there, as it is really not necessary.

The first one we use to download pre-compiled copies of llvm-objcopy. This use-case I think would be nicely covered by using build.zig.zon, except that:

  • we really don’t like adding more files to the root of our repository. jorandirkgreef wants us to remove .gitignore even, which I myself am slowly coming around to :rofl:
  • the proper fix here is teaching zig objcopy to do what we use llvm-objcopy for, the whole current thing in general is a stop-gap nonsense.

The second one is more interesting — here, we download the previous release of TigerBeetle from GitHub. We need that for testing our upgrade path. This use-case I think isn’t covered by build.zig.zon:

  • there’s a matrix of things, version X os X arch X debug, and generating it programmatically is easier
  • in fact, because there’s a new version and a new release every weak, you can’t really even encode all the hashes at all.

I understand that the proper path for me is to write my own step that combines Zig’s http client with zip with chmod with (optionally) sha, but I am just wondering if there’s some sort of zig curl around which I could just re-use :upside_down_face: I am totally cool with the answer being “no, just write the custom thing yourself, if you need it”!

1 Like