17 Jul 2024 , tagged: zig
Zig’s package manager is still a bit rough. It only supports fetching tarballs, but many github projects don’t have them unless they have a release. There’s a trick to fetch any commit as a tarball though: https://api.github.com/repos/<repo-owner>/<repo>/tarball/<ref> zig fetch can than download the code: zig fetch --save https://api.github.com/repos/<repo-owner>/<repo>/tarball/<ref> Once the code is downloaded, it still has to be added to your exe or libray in build.zig: const exe = b.addExecutable(.{ .