From d725c113374186b9b435a75401f7bcf4a4e123d4 Mon Sep 17 00:00:00 2001 From: hazeycode <22148308+hazeycode@users.noreply.github.com> Date: Sun, 15 Jan 2023 15:42:31 +0000 Subject: [PATCH 1/2] fix fmt syntax error (Zig 0.10.0) --- compile.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile.zig b/compile.zig index 115b8a5..db06afc 100644 --- a/compile.zig +++ b/compile.zig @@ -15,7 +15,7 @@ pub fn build(builder: *std.build.Builder) !void { "example-option", "test passing an option through build.zig", ); - std.log.info("example-option: {}", .{example_option}); + std.log.info("example-option: {any}", .{example_option}); } const ExampleStep = struct { From e8bbdd3945eff44d6725627b65440618bda83701 Mon Sep 17 00:00:00 2001 From: hazeycode <22148308+hazeycode@users.noreply.github.com> Date: Sun, 15 Jan 2023 18:01:02 +0000 Subject: [PATCH 2/2] Make FetchAndBuild.init public This allows more usage patterns --- fetch.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fetch.zig b/fetch.zig index 60bb17a..09f8516 100644 --- a/fetch.zig +++ b/fetch.zig @@ -50,7 +50,7 @@ pub fn fetchAndBuild( builder.getInstallStep().dependOn(&fetch_and_build.step); } -const FetchAndBuild = struct { +pub const FetchAndBuild = struct { builder: *std.build.Builder, step: std.build.Step, deps: []const Dependency, @@ -59,7 +59,7 @@ const FetchAndBuild = struct { run_zig_build: bool, fetch_cache_path: []const u8, - fn init( + pub fn init( builder: *std.build.Builder, deps_dir: []const u8, deps: []const Dependency,