╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ main_wasm.zig ────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
94 start(json, max_width) catch |err| { 95 var buf: [256]u8 = undefined; 96 const str = std.fmt.bufPrint(&buf, "start: {}", .{err}) catch unreachable; 97 consoleLog(str); 98 }; 99 } 100 101 export fn _tick(max_width: u32) bool { 102 tick(max_width) catch |err| { 103 var buf: [256]u8 = undefined; 104 const str = std.fmt.bufPrint(&buf, "tick: {}", .{err}) catch unreachable; 105 consoleLog(str); 106 return false; 107 }; 108 return true; 109 } 110 111 export fn _onKeyDown(key_code: u32) void { 112 onKeyDown(key_code) catch |err| { 113 var buf: [256]u8 = undefined; 114 const str = std.fmt.bufPrint(&buf, "onKeyDown: {}", .{err}) catch unreachable; 115 consoleLog(str); 116 }; 117 } 118 119 export fn _onMouseClick(focus_id: u32) void { 120 onMouseClick(focus_id) catch |err| { 121 var buf: [256]u8 = undefined; 122 const str = std.fmt.bufPrint(&buf, "onMouseClick: {}", .{err}) catch unreachable; 123 consoleLog(str); 124 }; 125 } 126