An HTTP/1.1 server for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

Updated build script (removed deprecated options) (#137)

explicitly set root_module in b.addTest and b.addExecutable
as .root_source_file, .target, .optimize, etc will
be deprecated in the future.

authored by

ItsMeSamey and committed by
Karl Seguin
(Jun 14, 2025, 7:05 PM +0800) e7542e48 5a15055c

+11 -7
+11 -7
build.zig
··· 25 25 const enable_tsan = b.option(bool, "tsan", "Enable ThreadSanitizer"); 26 26 const test_filter = b.option([]const u8, "test-filter", "Filter for test"); 27 27 const tests = b.addTest(.{ 28 - .root_source_file = b.path("src/httpz.zig"), 29 - .target = target, 30 - .optimize = optimize, 31 - .sanitize_thread = enable_tsan, 28 + .root_module = b.createModule(.{ 29 + .root_source_file = b.path("src/httpz.zig"), 30 + .target = target, 31 + .optimize = optimize, 32 + .sanitize_thread = enable_tsan, 33 + }), 32 34 .filter = test_filter, 33 35 .test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple }, 34 36 }); ··· 74 76 for (examples) |ex| { 75 77 const exe = b.addExecutable(.{ 76 78 .name = ex.name, 77 - .target = target, 78 - .optimize = optimize, 79 - .root_source_file = b.path(ex.file), 79 + .root_module = b.createModule(.{ 80 + .root_source_file = b.path(ex.file), 81 + .target = target, 82 + .optimize = optimize, 83 + }), 80 84 }); 81 85 exe.root_module.addImport("httpz", httpz_module); 82 86 exe.root_module.addImport("metrics", metrics_module);