From a4b2398aba2211ce5901ceb46f73057864bd1707 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Tue, 6 Oct 2026 14:12:03 +0200 Subject: add global registry --- src/z/root.zig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/z/root.zig') diff --git a/src/z/root.zig b/src/z/root.zig index 6ca6302..fc42acd 100644 --- a/src/z/root.zig +++ b/src/z/root.zig @@ -1,4 +1,5 @@ const builtin = @import("builtin"); +const std = @import("std"); const wasm = wasm_struct: { if (builtin.target.cpu.arch.isWasm()) { @@ -10,10 +11,19 @@ const wasm = wasm_struct: { }; } - break :wasm_struct struct {}; + break :wasm_struct struct { + pub const Env = struct { + pub const Object = struct {}; + }; + }; }; pub const env = wasm.env; pub const Env = wasm.Env; -pub const app = @import("app/root.zig"); +pub const App = @import("App/root.zig").App; + +pub const allocator: std.mem.Allocator = if (builtin.target.cpu.arch.isWasm()) .{ + .ptr = undefined, + .vtable = &std.heap.BrkAllocator.vtable, +} else .failing; -- cgit v1.2.3-70-g09d2