diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db0f9dd..58bc6cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,10 +14,10 @@ jobs: strategy: fail-fast: false matrix: - zig-version: ["0.14.0"] + zig-version: ["0.15.2"] os: [macos-latest, windows-latest] include: - - zig-version: "0.14.0" + - zig-version: "0.15.2" os: ubuntu-latest check-format: true diff --git a/build.zig b/build.zig index e108269..4084fd3 100644 --- a/build.zig +++ b/build.zig @@ -6,14 +6,15 @@ pub fn build(b: *std.Build) void { const upstream = b.dependency("protobuf_c", .{}); - const lib = b.addStaticLibrary(.{ + const lib = b.addLibrary(.{ .name = "protobuf_c", - .target = target, - .optimize = optimize, + .root_module = b.createModule(.{ + .target = target, + .optimize = optimize, + .link_libc = true, + }), }); - lib.linkLibC(); - lib.addCSourceFiles(.{ .root = upstream.path("protobuf-c"), .files = &.{"protobuf-c.c"}, diff --git a/build.zig.zon b/build.zig.zon index d4d9f76..b78298d 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -2,7 +2,7 @@ .name = .protobuf_c, .fingerprint = 0x39094F755166B308, .version = "1.5.0", - .minimum_zig_version = "0.14.0", + .minimum_zig_version = "0.15.2", .dependencies = .{ .protobuf_c = .{ .url = "git+https://github.com/protobuf-c/protobuf-c?ref=v1.5.0#8c201f6e47a53feaab773922a743091eb6c8972a",