From 4e47477e9a20c1fc9608550c7c42a7b0667bad29 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Tue, 11 Oct 2022 00:55:32 +0200 Subject: [PATCH] mach: export WebGPU C ABI compatibility Signed-off-by: Stephen Gutekanst --- src/platform/libmach.zig | 2 ++ src/platform/native.zig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/platform/libmach.zig b/src/platform/libmach.zig index 63c5a5b3..a128f1ea 100644 --- a/src/platform/libmach.zig +++ b/src/platform/libmach.zig @@ -12,6 +12,8 @@ _unused: i32, pub const GPUInterface = gpu.dawn.Interface; +const _ = gpu.Export(GPUInterface); + // Dummy init, deinit, and update functions pub fn init(_: *App, _: *Core) !void {} diff --git a/src/platform/native.zig b/src/platform/native.zig index 9300fe17..2d733912 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -558,6 +558,8 @@ var app: App = undefined; pub const GPUInterface = gpu.dawn.Interface; +const _ = gpu.Export(GPUInterface); + pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; defer _ = gpa.deinit();