From 301a2cb809fda8223af90fe8e1fb4194275bd23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Tue, 1 Apr 2025 20:38:08 +0300 Subject: [PATCH 1/4] fix!: build breaking: Changes module name to extism_pdk breaking: HTTP internal headers function renamed to getInternal to avoid conflicts --- .gitignore | 3 ++- build.zig | 2 +- build.zig.zon | 6 ++++-- src/http.zig | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c7a9c12..3b20f96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -zig-* +.zig-cache +zig-out examples-out diff --git a/build.zig b/build.zig index fad0aa4..44f0ded 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.13.0-dev.230+50a141945") catch unreachable; // build system changes: ziglang/zig#19597 + const min_zig = std.SemanticVersion.parse("0.14.0") catch unreachable; // https://ziglang.org/download/0.14.0/release-notes.html 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 })); } diff --git a/build.zig.zon b/build.zig.zon index 01933a1..79a156e 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,5 +1,7 @@ .{ - .name = "extism-pdk", - .version = "1.2.0", + .name = .extism_pdk, + .version = "1.2.1", + .minimum_zig_version = "0.14.0", + .fingerprint = 0x5971fd97f3e84356, .paths = .{""}, } diff --git a/src/http.zig b/src/http.zig index ac59a27..653eedf 100644 --- a/src/http.zig +++ b/src/http.zig @@ -22,7 +22,7 @@ pub const Headers = struct { } /// Access the internal data to iterate over or mutate as needed. - pub fn internal(self: Headers) std.json.ArrayHashMap([]const u8) { + pub fn getInternal(self: Headers) std.json.ArrayHashMap([]const u8) { return self.internal; } From aedbad1c884d1ba8814515d63cfb8b3d15b8117d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Tue, 1 Apr 2025 20:43:41 +0300 Subject: [PATCH 2/4] fix: update dependency name in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4560e49..b902701 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ pub fn build(b: *std.Build) void { // if you're using WASI, change the .os_tag to .wasi .default_target = .{ .abi = .musl, .os_tag = .freestanding, .cpu_arch = .wasm32 }, }); - const pdk_module = b.dependency("extism-pdk", .{ .target = target, .optimize = optimize }).module("extism-pdk"); + const pdk_module = b.dependency("extism_pdk", .{ .target = target, .optimize = optimize }).module("extism-pdk"); var plugin = b.addExecutable(.{ .name = "my-plugin", .root_source_file = .{ .path = "src/main.zig" }, From f950f30d13d4dc59265763621ae5d3014de665a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Tue, 1 Apr 2025 21:44:32 +0300 Subject: [PATCH 3/4] chore: update zig version --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/ci.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a2590781c53112d8112b18f5bf0c005c2d694c7c GIT binary patch literal 6148 zcmeHKy-EW?5S}#=4@HQeAXbN+5JOVho$-8vyg*DM7a_+5V^9?2?0g9e8=pcf6f7)k z6l{F}OCP|Q-7(qCCFvBA8QA^yc4l_IeD||i08rI_s{&8}01q2sejd9qMt*7;o8g&d zL`7?KqDrlq#NAA!Oo#%az+Y5=-rYQuAc6xpa^Byo&okQ>Ct=v=Bn_PNis9W&>G^Tn z^|z+_yKU>+aP4C%%zf8|HuRz4RENc-Y=q6>;r`-0y44&;)`^oLlgUvIA1D(a5BA{% z_8^8Xba32r8LeNAi?KQFd<-~c*0NbmiyOl$2R%51rpspQ7}>DL<}kaq@lrJRX5by_ zk@dRu>bNN0ms5NiBG`lk?~D6Xth_#DBkcM?x%$TSN7k_wm>lKsS$QWuVn3q*?%8DC zf#j83V@DAbQZ0NkufNijNq| zq~pBLaRFm$(4>Rn!-wL^iccs?SI6~z9S$lmD7`2k3b+d7%w>W0|J}*we>X|4L;+FY zUn!vSVJ)oUPvX5b^W$i*^|95lkx^V~P^VzW+p!+dR=kQ$8~S`2AO?)7L7YL8KLT0? K=|q8FRp1M?DX4P* literal 0 HcmV?d00001 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8305e29..1e1df5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Install Zig uses: goto-bus-stop/setup-zig@v2 with: - version: 0.13.0 + version: 0.14.0 - name: Check Zig Version run: zig version @@ -78,4 +78,4 @@ jobs: test $COUNT -eq 3 TEST=$(extism call zig-out/bin/basic-example.wasm http_headers --input '' --allow-host github.com --enable-http-response-headers --log-level debug 2>&1) - echo $TEST | grep "text/html" \ No newline at end of file + echo $TEST | grep "text/html" From 1c405994ffcf29ec8a238ea58c93500f5f314f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fu=20Us?= Date: Wed, 14 May 2025 20:25:16 +0300 Subject: [PATCH 4/4] chore: update zig action & delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes .github/workflows/ci.yml | 2 +- .gitignore | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index a2590781c53112d8112b18f5bf0c005c2d694c7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKy-EW?5S}#=4@HQeAXbN+5JOVho$-8vyg*DM7a_+5V^9?2?0g9e8=pcf6f7)k z6l{F}OCP|Q-7(qCCFvBA8QA^yc4l_IeD||i08rI_s{&8}01q2sejd9qMt*7;o8g&d zL`7?KqDrlq#NAA!Oo#%az+Y5=-rYQuAc6xpa^Byo&okQ>Ct=v=Bn_PNis9W&>G^Tn z^|z+_yKU>+aP4C%%zf8|HuRz4RENc-Y=q6>;r`-0y44&;)`^oLlgUvIA1D(a5BA{% z_8^8Xba32r8LeNAi?KQFd<-~c*0NbmiyOl$2R%51rpspQ7}>DL<}kaq@lrJRX5by_ zk@dRu>bNN0ms5NiBG`lk?~D6Xth_#DBkcM?x%$TSN7k_wm>lKsS$QWuVn3q*?%8DC zf#j83V@DAbQZ0NkufNijNq| zq~pBLaRFm$(4>Rn!-wL^iccs?SI6~z9S$lmD7`2k3b+d7%w>W0|J}*we>X|4L;+FY zUn!vSVJ)oUPvX5b^W$i*^|95lkx^V~P^VzW+p!+dR=kQ$8~S`2AO?)7L7YL8KLT0? K=|q8FRp1M?DX4P* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e1df5e..66b3adc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: run: extism --version - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/setup-zig@v2 with: version: 0.14.0 diff --git a/.gitignore b/.gitignore index 3b20f96..2faf440 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .zig-cache zig-out examples-out +.DS_Store