From 9f3c6a3fa5d68a90f03147d7b4a1f49fdf1a0e3c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 1 Oct 2026 15:33:14 +0200 Subject: [PATCH 1/3] fix(windows): link against synchronization --- build.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/build.zig b/build.zig index 805dd58..9b2b203 100644 --- a/build.zig +++ b/build.zig @@ -59,6 +59,7 @@ pub fn build(b: *std.Build) void { root_module.linkSystemLibrary("dbghelp", .{}); root_module.linkSystemLibrary("ole32", .{}); root_module.linkSystemLibrary("shell32", .{}); + root_module.linkSystemLibrary("api-ms-win-core-synch-l1-2-0", .{}); if (isDebugBuild(optimize)) root_module.linkSystemLibrary("ucrtbased", .{}); From 91117c635f011e8ba42566bb83b1cdeaab467674 Mon Sep 17 00:00:00 2001 From: torque Date: Thu, 1 Oct 2026 21:15:29 -0600 Subject: [PATCH 2/3] build: support MSVC ABI on Windows --- build.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index 9b2b203..dc8582c 100644 --- a/build.zig +++ b/build.zig @@ -59,8 +59,11 @@ pub fn build(b: *std.Build) void { root_module.linkSystemLibrary("dbghelp", .{}); root_module.linkSystemLibrary("ole32", .{}); root_module.linkSystemLibrary("shell32", .{}); - root_module.linkSystemLibrary("api-ms-win-core-synch-l1-2-0", .{}); - if (isDebugBuild(optimize)) + if (tinfo.abi.isGnu()) + root_module.linkSystemLibrary("api-ms-win-core-synch-l1-2-0", .{}) + else + root_module.linkSystemLibrary("synchronization", .{}); + if (isDebugBuild(optimize) and tinfo.abi.isGnu()) root_module.linkSystemLibrary("ucrtbased", .{}); root_module.addCSourceFiles(.{ From 88bb15e5f2a0843f8dbb45b79bcaa76e91d8ee26 Mon Sep 17 00:00:00 2001 From: torque Date: Thu, 1 Oct 2026 21:15:46 -0600 Subject: [PATCH 3/3] ci: test building with MSVC ABI on Windows --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b172c43..a20ad51 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,9 @@ jobs: os: macos-latest check-format: true build-options: "-Dbuild-tests -Dbuild-benchmarks" + - zig-version: "master" + os: windows-latest + build-options: "-Dtarget=native-native-msvc" runs-on: ${{ matrix.os }} steps: