From 3f1533813b6692a736251e4d467a7f108229ddee Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 11:40:11 -0300 Subject: targets: the DOM web shell goes (src/web.zig and src/web/, its harnesses web_harness, web_snapshot, web_driver_test and web-snapshots/, tools/web_fixture.py, -Dplatform=web, -Ddump, and the web, web-harness, web-snap, web-e2e and web-driver-test steps), and with it what only a freestanding build needed: `hosted` and every guard on it (every build has a host now), memory's stack-fallback arenas and reduced_target sizes, the emscripten main, the tree-sitter libc shim and the stb stub, lsp's has_client, the web arms of the platform switches (-Dplatform is tui, gui or macos); the macOS files pass zig ast-check; docs/web.md is a paragraph on what it was Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/terminal.zig | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/terminal.zig') diff --git a/src/terminal.zig b/src/terminal.zig index 9aa97f71..c041ae22 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -496,17 +496,13 @@ pub fn deinitPendingCommand(pane: *Pane) void { /// (which ghostty accepts whatever this says). The environment block lives /// as long as the process and pardes never edits it (ChildEnv.exportVar). fn tempDir() []const u8 { - if (comptime !pardes.hosted) return "/tmp"; const dir = std.c.getenv("TMPDIR") orelse return "/tmp"; const path = std.mem.span(dir); return if (path.len > 0 and path[0] == '/') path else "/tmp"; } pub fn terminalIo() std.Io { - return if (comptime !pardes.hosted) - std.Io.failing - else - std.Io.Threaded.global_single_threaded.io(); + return std.Io.Threaded.global_single_threaded.io(); } /// The three numbers ghostty's scrollbar reports; all zero without an emulator. @@ -598,9 +594,9 @@ pub const emulator_gpa = std.heap.c_allocator; /// What a terminal's emulator is made with, by `create` or a pane's load /// (dump.loadPane, a closed terminal brought back): `gpa`, but on a screen- -/// state replica `emulator_gpa`. A hosted build's: the web has no C heap. +/// state replica `emulator_gpa`. pub fn emulatorGpa(gpa: std.mem.Allocator) std.mem.Allocator { - return if (comptime pardes.hosted) (if (pardes.tape.screenReplica()) emulator_gpa else gpa) else gpa; + return if (pardes.tape.screenReplica()) emulator_gpa else gpa; } /// A replica's speculation leaves an emulator be: it is the authority's -- cgit v1.3