mach: export WebGPU C ABI compatibility

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-10-11 00:55:32 +02:00
parent ec8ced475f
commit 4e47477e9a
2 changed files with 4 additions and 0 deletions

View file

@ -12,6 +12,8 @@ _unused: i32,
pub const GPUInterface = gpu.dawn.Interface; pub const GPUInterface = gpu.dawn.Interface;
const _ = gpu.Export(GPUInterface);
// Dummy init, deinit, and update functions // Dummy init, deinit, and update functions
pub fn init(_: *App, _: *Core) !void {} pub fn init(_: *App, _: *Core) !void {}

View file

@ -558,6 +558,8 @@ var app: App = undefined;
pub const GPUInterface = gpu.dawn.Interface; pub const GPUInterface = gpu.dawn.Interface;
const _ = gpu.Export(GPUInterface);
pub fn main() !void { pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){}; var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit(); defer _ = gpa.deinit();