diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-06 14:12:03 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-10-06 14:12:03 +0200 |
| commit | a4b2398aba2211ce5901ceb46f73057864bd1707 (patch) | |
| tree | 99c3d277ad991c189bf342238509be59b36b7889 /src/z/root.zig | |
| parent | dccd1987b418e47b4b82eda3aeaed40be18d9e45 (diff) | |
add global registry
Diffstat (limited to 'src/z/root.zig')
| -rw-r--r-- | src/z/root.zig | 14 |
1 files changed, 12 insertions, 2 deletions
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; |