diff --git a/.gitmodules b/.gitmodules index bddf62e..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "src/deps/zig-network"] - path = src/deps/zig-network - url = https://github.com/ikskuh/zig-network diff --git a/_notes.txt b/_notes.txt index b00571f..bdd908a 100644 --- a/_notes.txt +++ b/_notes.txt @@ -388,6 +388,7 @@ Import zig fetch --save=zig-datetime git+https://github.com/frmdstryr/zig-datetime + zig fetch --save=network git+https://github.com/ikskuh/zig-network diff --git a/build.zig b/build.zig index 30b8083..9e0bb33 100644 --- a/build.zig +++ b/build.zig @@ -25,6 +25,11 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); + const zig_network = b.dependency("network", .{ + .target = target, + .optimize = optimize, + }); + const lib = b.addStaticLibrary(.{ .name = "syslog", // In this case the main source file is merely a path, however, in more @@ -35,6 +40,7 @@ pub fn build(b: *std.Build) void { }); lib.root_module.addImport("zig-datetime", zig_datetime.module("zig-datetime")); + lib.root_module.addImport("network", zig_network.module("network")); // This declares intent for the library to be installed into the standard // location when the user invokes the "install" step (the default step when @@ -49,6 +55,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); + lib_unit_tests.root_module.addImport("network", zig_network.module("network")); lib_unit_tests.root_module.addImport("zig-datetime", zig_datetime.module("zig-datetime")); lib_unit_tests.root_module.addImport("mailbox", mailbox.module("mailbox")); diff --git a/build.zig.zon b/build.zig.zon index 407859c..bbd760b 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -28,9 +28,13 @@ .hash = "12208d8777b69f62cccf70b4372d8c31a22bb022881279713d424689d6555532d389", }, .@"zig-datetime" = .{ - .url = "git+https://github.com/frmdstryr/zig-datetime#70aebf28fb3e137cd84123a9349d157a74708721", + .url = "git+https://github.com/frmdstryr/zig-datetime", .hash = "122077215ce36e125a490e59ec1748ffd4f6ba00d4d14f7308978e5360711d72d77f", }, + .network = .{ + .url = "git+https://github.com/ikskuh/zig-network#805ce63eec48373ec497542f18f19d7c484b9b2e", + .hash = "122007f014c736cee735f1fe71660e39aa9f8c9351deab2e35c4dd9ab69d37d8db46", + }, }, .paths = .{ "build.zig", diff --git a/src/deps/zig-network b/src/deps/zig-network deleted file mode 160000 index 805ce63..0000000 --- a/src/deps/zig-network +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 805ce63eec48373ec497542f18f19d7c484b9b2e diff --git a/src/syslog_tests.zig b/src/syslog_tests.zig index 0e77b68..53beaa3 100644 --- a/src/syslog_tests.zig +++ b/src/syslog_tests.zig @@ -5,7 +5,7 @@ const mailbox = @import("mailbox"); const syslog = @import("syslog.zig"); const transport = @import("transport.zig"); const rfc = @import("rfc5424.zig"); -const network = @import("deps/zig-network/network.zig"); +const network = @import("network"); //--------------------------------- const Thread = std.Thread; diff --git a/src/transport.zig b/src/transport.zig index 933ff00..dc94e43 100644 --- a/src/transport.zig +++ b/src/transport.zig @@ -1,6 +1,6 @@ //--------------------------------- const std = @import("std"); -pub const network = @import("deps/zig-network/network.zig"); +pub const network = @import("network"); //--------------------------------- //---------------------------------