From eac6e1e752d1d1627c17dde42dd0478ed8b9a15d Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Thu, 4 Jan 2024 15:42:57 -0700 Subject: [PATCH] fix: build.zig updates --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 44a234e..e5a4c8b 100644 --- a/build.zig +++ b/build.zig @@ -4,7 +4,7 @@ const builtin = @import("builtin"); pub fn build(b: *std.Build) void { comptime { const current_zig = builtin.zig_version; - const min_zig = std.SemanticVersion.parse("0.12.0-dev.64+b835fd90c") catch unreachable; // std.json.ArrayHashMap + const min_zig = std.SemanticVersion.parse("0.12.0-dev.2030+2ac315c24") catch unreachable; // std.json.ArrayHashMap if (current_zig.order(min_zig) == .lt) { @compileError(std.fmt.comptimePrint("Your Zig version v{} does not meet the minimum build requirement of v{}", .{ current_zig, min_zig })); } @@ -16,7 +16,7 @@ pub fn build(b: *std.Build) void { }); const pdk_module = b.addModule("extism-pdk", .{ - .source_file = .{ .path = "src/main.zig" }, + .root_source_file = .{ .path = "src/main.zig" }, }); var basic_example = b.addExecutable(.{ @@ -25,8 +25,8 @@ pub fn build(b: *std.Build) void { .target = target, .optimize = optimize, }); - basic_example.addModule("extism-pdk", pdk_module); basic_example.rdynamic = true; + basic_example.root_module.addImport("extism-pdk", pdk_module); b.installArtifact(basic_example); const basic_example_step = b.step("basic_example", "Build basic_example");