diff options
author | Robby Zambito <contact@robbyzambito.me> | 2025-04-02 17:27:46 -0400 |
---|---|---|
committer | Robby Zambito <contact@robbyzambito.me> | 2025-04-02 18:08:22 -0400 |
commit | 18763983e2eadfac417c57110c6c21c1b453b560 (patch) | |
tree | ac41ea0cccd4af6b9a66fbc8f256c367e0cc8d68 | |
parent | 3354a85c1ae6b5c47540e4e154d39996980fee79 (diff) |
Added network dep
-rw-r--r-- | build.zig | 2 | ||||
-rw-r--r-- | build.zig.zon | 42 |
2 files changed, 6 insertions, 38 deletions
@@ -26,6 +26,8 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); + exe_mod.addImport("network", b.dependency("network", .{}).module("network")); + // This creates another `std.Build.Step.Compile`, but this one builds an executable // rather than a static library. const exe = b.addExecutable(.{ diff --git a/build.zig.zon b/build.zig.zon index 1dd1811..da40722 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -36,45 +36,11 @@ // Once all dependencies are fetched, `zig build` no longer requires // internet connectivity. .dependencies = .{ - // See `zig fetch --save <url>` for a command-line interface for adding dependencies. - //.example = .{ - // // When updating this field to a new URL, be sure to delete the corresponding - // // `hash`, otherwise you are communicating that you expect to find the old hash at - // // the new URL. If the contents of a URL change this will result in a hash mismatch - // // which will prevent zig from using it. - // .url = "https://example.com/foo.tar.gz", - // - // // This is computed from the file contents of the directory of files that is - // // obtained after fetching `url` and applying the inclusion rules given by - // // `paths`. - // // - // // This field is the source of truth; packages do not come from a `url`; they - // // come from a `hash`. `url` is just one of many possible mirrors for how to - // // obtain a package matching this `hash`. - // // - // // Uses the [multihash](https://multiformats.io/multihash/) format. - // .hash = "...", - // - // // When this is provided, the package is found in a directory relative to the - // // build root. In this case the package's hash is irrelevant and therefore not - // // computed. This field and `url` are mutually exclusive. - // .path = "foo", - // - // // When this is set to `true`, a package is declared to be lazily - // // fetched. This makes the dependency only get fetched if it is - // // actually used. - // .lazy = false, - //}, + .network = .{ + .url = "https://github.com/ikskuh/zig-network/archive/c76240d2240711a3dcbf1c0fb461d5d1f18be79a.zip", + .hash = "network-0.1.0-AAAAAOwlAQAQ6zKPUrsibdpGisxld9ftUKGdMvcCSpaj", + }, }, - - // Specifies the set of files and directories that are included in this package. - // Only files and directories listed here are included in the `hash` that - // is computed for this package. Only files listed here will remain on disk - // when using the zig package manager. As a rule of thumb, one should list - // files required for compilation plus any license(s). - // Paths are relative to the build root. Use the empty string (`""`) to refer to - // the build root itself. - // A directory listed here means that all files within, recursively, are included. .paths = .{ "build.zig", "build.zig.zon", |