aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/build/GhosttyZig.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/build/GhosttyZig.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/build/GhosttyZig.zig')
-rw-r--r--vendor/libghostty-vt/src/build/GhosttyZig.zig18
1 files changed, 16 insertions, 2 deletions
diff --git a/vendor/libghostty-vt/src/build/GhosttyZig.zig b/vendor/libghostty-vt/src/build/GhosttyZig.zig
index 44c300e1..46ab05d5 100644
--- a/vendor/libghostty-vt/src/build/GhosttyZig.zig
+++ b/vendor/libghostty-vt/src/build/GhosttyZig.zig
@@ -64,7 +64,7 @@ fn initInner(
vt_c_name: []const u8,
) !GhosttyZig {
// Terminal module build options
- var vt_options = cfg.terminalOptions(.lib);
+ var vt_options = cfg.terminalOptions(.lib, cfg.optimize);
vt_options.artifact = .lib;
// We presently don't allow Oniguruma in our Zig module at all.
// We should expose this as a build option in the future so we can
@@ -135,7 +135,21 @@ fn initVt(
deps.unicode_tables.addModuleImport(vt);
// We need uucode for grapheme break support
- deps.addUucode(b, vt, cfg.target, cfg.optimize);
+ vt.addImport("uucode", deps.uucode_mod);
+
+ // We need wuffs for Kitty graphics pixel operations (format
+ // conversion and alpha blending). Unlike pure Zig dependencies
+ // its C code is compiled whenever the module is in the build
+ // graph regardless of analysis, so only wire it in when Kitty
+ // graphics is actually enabled.
+ if (vt_options.kittyGraphics(cfg.target.result)) {
+ if (b.lazyDependency("wuffs", .{
+ .target = cfg.target,
+ .optimize = cfg.optimize,
+ })) |dep| {
+ vt.addImport("wuffs", dep.module("wuffs"));
+ }
+ }
// If SIMD is enabled, add all our SIMD dependencies.
if (cfg.simd) {