diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-24 14:02:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | 2c670371a21cde5ab506eda02dc2233e20fc1fe1 (patch) | |
| tree | 5b5b09ac6b1bf40dd739d7ad9e21325763336455 /build.zig | |
| parent | 685b8c8e74c9edbdf701594f50ff1b70ac288ec9 (diff) | |
| parent | fcfe51b6507ade9c72f94e40ee5c31a8ee818e30 (diff) | |
| download | pardes-2c670371a21cde5ab506eda02dc2233e20fc1fe1.tar.gz pardes-2c670371a21cde5ab506eda02dc2233e20fc1fe1.zip | |
docs: note native web client + WASM-only text logic in ideas.typ
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -304,11 +304,20 @@ pub fn build(b: *std.Build) void { // (.{ .READ = true, .WRITE = true }); // src/terminal/kitty/graphics_image.zig:185 — shm_open's variadic mode // literal 0 must be @as(std.c.mode_t, 0). + // Darwin HOSTS need a third: src/build/GhosttyDist.zig:28 — the dist + // tarball's GTK resources run pkg-config for libadwaita eagerly (panics + // without it); gate that block on `b.graph.host.result.os.tag == .linux`. + // Ghostty's pinned translate-c tarball also 404s now (codeberg dropped + // the archive endpoint) — seed zig-pkg/ from a machine that has it. const ghostty_simd = !target.result.os.tag.isDarwin() or b.graph.host.result.os.tag.isDarwin(); + // app-runtime none + emit-xcframework off: only the ghostty-vt module is + // consumed, and the defaults otherwise drag ghostty's app graph into the + // build — gtk4 header translation via host pkg-config for linux targets, + // the Xcode app graph (iOS SDK, xcodebuild) on darwin hosts. const ghostty_dep = if (is_emscripten) b.lazyDependency("ghostty", .{ .simd = false }) else - b.lazyDependency("ghostty", .{ .target = target, .optimize = optimize, .simd = ghostty_simd }); + b.lazyDependency("ghostty", .{ .target = target, .optimize = optimize, .simd = ghostty_simd, .@"app-runtime" = .none, .@"emit-xcframework" = false }); if (ghostty_dep) |dep| { const ghostty_vt = dep.module("ghostty-vt"); ghostty_vt_for_snap = ghostty_vt; @@ -365,6 +374,12 @@ pub fn build(b: *std.Build) void { if (emscripten_include) |include| root_mod.addSystemIncludePath(include); if (is_emscripten) wasm_libs.append(b.allocator, sdl_lib.getEmittedBin()) catch @panic("OOM"); } + // darwin: SDL_GPU only speaks SPIRV here (shaders/*.glsl -> glslc), so + // it must pick its vulkan backend via the Vulkan SDK's loader + + // MoltenVK in /usr/local/lib — a path dyld no longer searches for + // bare dlopen names. The rpath restores that lookup. + if (target.result.os.tag.isDarwin()) + root_mod.addRPath(.{ .cwd_relative = "/usr/local/lib" }); root_mod.addIncludePath(b.path("vendor/stb")); root_mod.addCSourceFile(.{ .file = b.path("vendor/stb/stb_truetype_impl.c") }); root_mod.addCSourceFile(.{ .file = b.path("vendor/stb/font.c") }); |
