From 3618a9a92ddacd3f240f345f16a352d6cb6b418d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Thu, 4 Jan 2024 22:43:50 +0300 Subject: [PATCH 1/2] fix: build --- README.md | 2 +- build.zig | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3f72b02..42d8158 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ This package works with the Zig package manager introduced in Zig 0.11. Create a And in your `build.zig`: ```zig const extism_module = b.dependency("extism", .{ .target = target, .optimize = optimize }).module("extism"); -exe.addModule("extism", extism_module); +exe.root_module.addImport("extism", extism_module); // TODO: make this easier to install // add the shared library & header exe.linkLibC(); diff --git a/build.zig b/build.zig index b916c38..a021ef2 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") catch unreachable; // build system changes: ziglang/zig#18160 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 })); } @@ -14,7 +14,7 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); const extism_module = b.addModule("extism", .{ - .source_file = .{ .path = "src/main.zig" }, + .root_source_file = .{ .path = "src/main.zig" }, }); var tests = b.addTest(.{ @@ -24,7 +24,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - tests.addModule("extism", extism_module); + tests.root_module.addImport("extism", extism_module); tests.linkLibC(); tests.addIncludePath(.{ .path = "/usr/local/include" }); tests.addLibraryPath(.{ .path = "/usr/local/lib" }); @@ -41,7 +41,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - example.addModule("extism", extism_module); + example.root_module.addImport("extism", extism_module); example.linkLibC(); example.addIncludePath(.{ .path = "/usr/local/include" }); example.addLibraryPath(.{ .path = "/usr/local/lib" }); From c035e201d8a1d8a9386a44b77a1a25c254355458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Thu, 4 Jan 2024 23:03:03 +0300 Subject: [PATCH 2/2] chore: bump version --- build.zig.zon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig.zon b/build.zig.zon index 5482cf5..9692213 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,5 +1,5 @@ .{ .name = "extism", - .version = "1.0.0-rc1", + .version = "1.0.0-rc2", .paths = .{""}, }