From 58a07a84d023752b5f5a95de1dec1b105353d559 Mon Sep 17 00:00:00 2001 From: adrien Date: Sun, 24 May 2026 12:04:44 +0200 Subject: [PATCH] Link libc for window - Window and MacOS to be tested --- README.md | 5 ++++- build.zig | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b72b0ff..0d11e2d 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,10 @@ zig build bench_cp ## System Requirements -Because this library binds to native system graphics APIs via `wgpu-native`, you must ensure the appropriate development headers and libraries are available on your system before compiling. +Because this library binds to native system graphics APIs via `wgpu-native`, +you must ensure the appropriate development headers and libraries are available on your system before compiling. + +It work both for x86_64 and aarch64 on all platforms. ### Linux (Vulkan) diff --git a/build.zig b/build.zig index 438f84f..602d19f 100644 --- a/build.zig +++ b/build.zig @@ -32,6 +32,7 @@ pub fn build(b: *std.Build) !void { mod.linkSystemLibrary("d3d12", .{}); mod.linkSystemLibrary("dxgi", .{}); mod.linkSystemLibrary("user32", .{}); + mod.link_libc = true; } else { mod.linkSystemLibrary("vulkan", .{}); mod.linkSystemLibrary("gcc_s", .{}); @@ -59,6 +60,11 @@ pub fn build(b: *std.Build) !void { }); exe.root_module.addImport("gpu", mod); + if (t.os.tag == .windows) { + exe.bundle_compiler_rt = false; + exe.bundle_ubsan_rt = false; + } + b.installArtifact(exe); const run_step = b.step(entry.name[0 .. entry.name.len - 4], try std.fmt.bufPrint(&buf, "Run {s} demo", .{entry.name}));