diff options
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -19,21 +19,21 @@ pub fn build(b: *std.Build) void { .name = "zigwebserver-exe", // In this case the main source file is merely a path, however, in more // complicated build scripts, this could be a generated file. - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); const lib = b.addStaticLibrary(.{ .name = "zigwebserver", - .root_source_file = .{ .path = "src/zigwebserver.zig" }, + .root_source_file = b.path("src/zigwebserver.zig"), .target = target, .optimize = optimize, }); b.installArtifact(lib); // for zig module system - _ = b.addModule("zigwebserver", .{ .root_source_file = .{ .path = "src/zigwebserver.zig" } }); + _ = b.addModule("zigwebserver", .{ .root_source_file = b.path("src/zigwebserver.zig") }); // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default @@ -66,7 +66,7 @@ pub fn build(b: *std.Build) void { // Creates a step for unit testing. This only builds the test executable // but does not run it. const unit_tests = b.addTest(.{ - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); |