authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 16:07:58 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-01 16:07:58 -07:00
log6f0d1255260410441c377a52dd73c308517276cd
tree1687a11910c70ccf8a718fbc33d2cfef64b58d41
parent840e25a18ee33d8bc08f2134fc1595aec56c09cc
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

update to zig 0.15.2


4 files changed, 18 insertions(+), 9 deletions(-)

build.zig+13-8
...@@ -4,13 +4,15 @@ const deps = @import("./deps.zig");...@@ -4,13 +4,15 @@ const deps = @import("./deps.zig");
44
5pub fn build(b: *std.Build) void {5pub fn build(b: *std.Build) void {
6 const target = b.standardTargetOptions(.{});6 const target = b.standardTargetOptions(.{});
7 const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug;7 const mode = b.option(std.builtin.OptimizeMode, "mode", "") orelse .Debug;
8 const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false;8 const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false;
99
10 const test_exe = b.addTest(.{10 const test_exe = b.addTest(.{
11 .root_source_file = b.path("test.zig"),11 .root_module = b.createModule(.{
12 .target = target,12 .root_source_file = b.path("test.zig"),
13 .optimize = mode,13 .target = target,
14 .optimize = mode,
15 }),
14 });16 });
15 deps.addAllTo(test_exe);17 deps.addAllTo(test_exe);
16 test_exe.use_llvm = !disable_llvm;18 test_exe.use_llvm = !disable_llvm;
...@@ -45,11 +47,14 @@ pub fn build(b: *std.Build) void {...@@ -45,11 +47,14 @@ pub fn build(b: *std.Build) void {
45}47}
4648
47fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []const u8, afl_clang_args: []const []const u8) *std.Build.Step.InstallFile {49fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []const u8, afl_clang_args: []const []const u8) *std.Build.Step.InstallFile {
48 const fuzz_lib = b.addStaticLibrary(.{50 const fuzz_lib = b.addLibrary(.{
51 .linkage = .static,
49 .name = "fuzz-" ++ name ++ "-lib",52 .name = "fuzz-" ++ name ++ "-lib",
50 .root_source_file = b.path("fuzz/main.zig"),53 .root_module = b.createModule(.{
51 .target = target,54 .root_source_file = b.path("fuzz/main.zig"),
52 .optimize = .Debug,55 .target = target,
56 .optimize = .Debug,
57 }),
53 });58 });
54 fuzz_lib.want_lto = true;59 fuzz_lib.want_lto = true;
55 fuzz_lib.bundle_compiler_rt = true;60 fuzz_lib.bundle_compiler_rt = true;
licenses.txt+1
...@@ -1,6 +1,7 @@...@@ -1,6 +1,7 @@
1MIT:1MIT:
2= https://spdx.org/licenses/MIT2= https://spdx.org/licenses/MIT
3- This3- This
4- git https://github.com/nektro/zig-expect
4- git https://github.com/nektro/zig-extras5- git https://github.com/nektro/zig-extras
5- git https://github.com/nektro/zig-sys-darwin6- git https://github.com/nektro/zig-sys-darwin
6- git https://github.com/nektro/zig-sys-linux7- git https://github.com/nektro/zig-sys-linux
test.zig+2-1
...@@ -3,6 +3,7 @@ const json = @import("json");...@@ -3,6 +3,7 @@ const json = @import("json");
3const build_options = @import("build_options");3const build_options = @import("build_options");
4const nfs = @import("nfs");4const nfs = @import("nfs");
5const nio = @import("nio");5const nio = @import("nio");
6const expect = @import("expect").expect;
67
7const JSONTestSuite_root = build_options.JSONTestSuite_root;8const JSONTestSuite_root = build_options.JSONTestSuite_root;
89
...@@ -579,7 +580,7 @@ fn expectCanonical(buffer: []const u8) !void {...@@ -579,7 +580,7 @@ fn expectCanonical(buffer: []const u8) !void {
579 defer doc.deinit(alloc);580 defer doc.deinit(alloc);
580 doc.acquire();581 doc.acquire();
581 defer doc.release();582 defer doc.release();
582 try std.testing.expectFmt(buffer, "{}", .{doc});583 try expect(buffer).toEqualNFmt("{}", .{doc});
583584
584 var buf: [4096]u8 = undefined;585 var buf: [4096]u8 = undefined;
585 var out: nio.FixedBufferStream([]u8) = .init(&buf);586 var out: nio.FixedBufferStream([]u8) = .init(&buf);
zig.mod+2
...@@ -12,6 +12,8 @@ dependencies:...@@ -12,6 +12,8 @@ dependencies:
12root_dependencies:12root_dependencies:
13 - src: git https://github.com/nektro/zig-nio13 - src: git https://github.com/nektro/zig-nio
14 - src: git https://github.com/nektro/zig-nfs14 - src: git https://github.com/nektro/zig-nfs
15 - src: git https://github.com/nektro/zig-expect
16
15 - src: git https://github.com/nst/JSONTestSuite commit-984defc2deaa653cb73cd29f4144a720ec9efe7c17 - src: git https://github.com/nst/JSONTestSuite commit-984defc2deaa653cb73cd29f4144a720ec9efe7c
16 id: bebdygynna6kk8zbbprkva6yd28x9wmf57vtzxjn18 id: bebdygynna6kk8zbbprkva6yd28x9wmf57vtzxjn
17 license: MIT19 license: MIT