News for hackers. Stuff that matters.
Re:Show HN: macOS-cross-compiler – Compile binaries for macO... by Cloudef on Sunday February 18, 2024 @12:00AM (#39416349)
zig fetch fills the hash for you, or simply omitting .hash in zon and the compiler tells it for you. I'm writing backend in zig and I have zstd directly from zon as a dependency.

    .dependencies = .{
        .zstd = .{
            .url = "git+https://github.com/facebook/zstd.git#v1.5.5",
            .hash = "1220185ad79a437fd9f148d1422ff756287534c79a0712105039b4034031480e41a9",
        },
    },
You then refer to that with dep = b.dependency(...) and can get paths to the unpacked source with dep.path(...)

There are no comments on this comment yet.