diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8305e29..66b3adc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,9 @@ jobs: run: extism --version - name: Install Zig - uses: goto-bus-stop/setup-zig@v2 + uses: mlugg/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" diff --git a/.gitignore b/.gitignore index c7a9c12..2faf440 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -zig-* +.zig-cache +zig-out examples-out +.DS_Store 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" }, 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; }