From 6310cbd57684d62c4fb6ac73e0fa9883fab402c8 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sun, 19 Mar 2023 11:45:59 +0100 Subject: Update to newest version of zig --- build.zig | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/build.zig b/build.zig index 6c9fbe2..b44a5fa 100644 --- a/build.zig +++ b/build.zig @@ -48,20 +48,25 @@ pub fn build(b: *std.Build) void { fn readMeStep(b: *std.Build) *std.Build.Step { const s = b.allocator.create(std.build.Step) catch unreachable; - s.* = std.build.Step.init(.custom, "ReadMeStep", b.allocator, struct { - fn make(step: *std.build.Step) anyerror!void { - @setEvalBranchQuota(10000); - _ = step; - const file = try std.fs.cwd().createFile("README.md", .{}); - const stream = file.writer(); - try stream.print(@embedFile("example/README.md.template"), .{ - @embedFile("example/simple.zig"), - @embedFile("example/simple-ex.zig"), - @embedFile("example/streaming-clap.zig"), - @embedFile("example/help.zig"), - @embedFile("example/usage.zig"), - }); - } - }.make); + s.* = std.build.Step.init(.{ + .id = .custom, + .name = "ReadMeStep", + .owner = b, + .makeFn = struct { + fn make(step: *std.build.Step, _: *std.Progress.Node) anyerror!void { + @setEvalBranchQuota(10000); + _ = step; + const file = try std.fs.cwd().createFile("README.md", .{}); + const stream = file.writer(); + try stream.print(@embedFile("example/README.md.template"), .{ + @embedFile("example/simple.zig"), + @embedFile("example/simple-ex.zig"), + @embedFile("example/streaming-clap.zig"), + @embedFile("example/help.zig"), + @embedFile("example/usage.zig"), + }); + } + }.make, + }); return s; } -- cgit v1.2.3