Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,3 @@ WhitespaceSensitiveMacros:
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
---

24 changes: 22 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,29 @@ jobs:
- name: Test GTK Build
run: nix develop -c zig build -Dapp-runtime=gtk -Demit-docs -Demit-webdata

# This relies on the cache being populated by the commands above.
# NOTE: This used to point to the Zig global cache directory before
# 0.16.0. Now, the cache directory exclusively stores "minified"
# archives of each dependency (i.e., only the paths defined in
# build.zig.zon), and an uncompressed, working copy is stored in
# PROJECT_ROOT/zig-pkg. The zig-pkg directory is warmed up during the
# regular fetching process from the global cache directory if
# possible.
#
# Nothing else should change; zon2nix's store path mimics what a
# zig-pkg directory should look like, so actual build steps should be
# fine, it's just here where we assume that all dependencies have been
# downloaded, and we want to test the validity of the package
# directory, do we need to have it pointing to zig-pkg and not the
# zon2nix store path.
#
# Note that this can also be attempted by running:
# zig build --fetch=needed
#
# Note that --system PKGDIR should not be added to this invocation as
# it disables fetching altogether (even, seemingly, from the local
# cache).
- name: Test System Build
run: nix develop -c zig build --system ${ZIG_GLOBAL_CACHE_DIR}/p
run: nix develop -c zig build --system "$(realpath zig-pkg)"

test-lib-vt:
if: github.repository == 'ghostty-org/ghostty' && needs.skip.outputs.skip != 'true'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
zig-cache/
.zig-cache/
zig-out/
zig-pkg/
build-cmake/
CMakeCache.txt
CMakeFiles/
Expand All @@ -29,3 +30,4 @@ glad.zip

vgcore.*

/sprite_face_test*
11 changes: 6 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ pub fn build(b: *std.Build) !void {
// use that as the version source of truth. Otherwise we fall back
// to what is in the build.zig.zon.
const file_version: ?[]const u8 = if (b.build_root.handle.readFileAlloc(
b.allocator,
b.graph.io,
"VERSION",
128,
b.allocator,
.limited(128),
)) |content| std.mem.trim(
u8,
content,
Expand Down Expand Up @@ -298,7 +299,7 @@ pub fn build(b: *std.Build) !void {
// We need to rebuild Ghostty with a baseline CPU target.
const valgrind_exe = exe: {
var valgrind_config = config;
valgrind_config.target = valgrind_config.baselineTarget();
valgrind_config.target = valgrind_config.baselineTarget(b.graph.io);
break :exe try buildpkg.GhosttyExe.init(
b,
&valgrind_config,
Expand Down Expand Up @@ -343,7 +344,7 @@ pub fn build(b: *std.Build) !void {
.filters = test_filters,
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = config.baselineTarget(),
.target = config.baselineTarget(b.graph.io),
.optimize = .Debug,
.strip = false,
.omit_frame_pointer = false,
Expand All @@ -358,7 +359,7 @@ pub fn build(b: *std.Build) !void {
// Verify our internal libghostty header.
const ghostty_h = b.addTranslateC(.{
.root_source_file = b.path("include/ghostty.h"),
.target = config.baselineTarget(),
.target = config.baselineTarget(b.graph.io),
.optimize = .Debug,
});
test_exe.root_module.addImport("ghostty.h", ghostty_h.createModule());
Expand Down
49 changes: 29 additions & 20 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,71 @@
.version = "1.3.2-dev",
.paths = .{""},
.fingerprint = 0x64407a2a0b4147e5,
.minimum_zig_version = "0.15.2",
.minimum_zig_version = "0.16.0",
.dependencies = .{
// Zig libs
// External translate-c
// NOTE: We might not need to keep this around forever, but we need it
// for at least the 0.16.0 release cycle since we need fixes in
// Aro/translate-c itself.
.translate_c = .{
.lazy = true,
.url = "https://codeberg.org/vancluever/translate-c/archive/a5bc193c925b03f74d44e1a4b29c117822473b91.tar.gz",
.hash = "translate_c-0.0.0-Q_BUWhFXBwBZBr7EnRC97AKPYXbwHkpcc4TASklMqZu9",
},

// Zig libs
.libxev = .{
// mitchellh/libxev
.url = "https://deps.files.ghostty.org/libxev-34fa50878aec6e5fa8f532867001ab3c36fae23e.tar.gz",
.hash = "libxev-0.0.0-86vtc4IcEwCqEYxEYoN_3KXmc6A9VLcm22aVImfvecYs",
.url = "https://github.com/mitchellh/libxev/archive/9ce8e8e6ff89e583258a7f8e7adeeeaeae8611bf.tar.gz",
.hash = "libxev-0.0.0-86vtcwIRFADbH4hk-EjROXxlrKIRPQdA41XiTSytYO-F",
.lazy = true,
},
.vaxis = .{
// rockorager/libvaxis
.url = "https://deps.files.ghostty.org/vaxis-7dbb9fd3122e4ffad262dd7c151d80d863b68558.tar.gz",
.hash = "vaxis-0.5.1-BWNV_LosCQAGmCCNOLljCIw6j6-yt53tji6n6rwJ2BhS",
.url = "https://github.com/rockorager/libvaxis/archive/1dbbe575dff4586fe51e3217aa5c3fecdcbb6089.tar.gz",
.hash = "vaxis-0.6.0-BWNV_CrbCQCscGpzsAlR402rYQ_tV3aAl081c2iRRkka",
.lazy = true,
},
.z2d = .{
// vancluever/z2d
.url = "https://deps.files.ghostty.org/z2d-0.10.0-j5P_Hu-6FgBsZNgwphIqh17jDnj8_yPtD8yzjO6PpHRQ.tar.gz",
.hash = "z2d-0.10.0-j5P_Hu-6FgBsZNgwphIqh17jDnj8_yPtD8yzjO6PpHRQ",
.url = "https://github.com/vancluever/z2d/archive/refs/tags/v0.11.0.tar.gz",
.hash = "z2d-0.11.0-j5P_HtLzDwBGyQt49DrT0v4BuVqI_SRs6CXsuj7eBVhR",
.lazy = true,
},
.zig_objc = .{
// mitchellh/zig-objc
.url = "https://deps.files.ghostty.org/zig_objc-f356ed02833f0f1b8e84d50bed9e807bf7cdc0ae.tar.gz",
.hash = "zig_objc-0.0.0-Ir_Sp5gTAQCvxxR7oVIrPXxXwsfKgVP7_wqoOQrZjFeK",
.url = "https://github.com/mitchellh/zig-objc/archive/c8de82ff80281215ad92900866dab7103a8efa8b.tar.gz",
.hash = "zig_objc-0.0.0-Ir_Sp9gsAQCPAJc0oF5xoWePHWP6Y6tCphDeyNUThJoi",
.lazy = true,
},
.zig_js = .{
// mitchellh/zig-js
.url = "https://deps.files.ghostty.org/zig_js-04db83c617da1956ac5adc1cb9ba1e434c1cb6fd.tar.gz",
.hash = "zig_js-0.0.0-rjCAV-6GAADxFug7rDmPH-uM_XcnJ5NmuAMJCAscMjhi",
.url = "https://github.com/mitchellh/zig-js/archive/3c23860e47fdcdc5af805efb7fd0bdac5fd3e9bc.tar.gz",
.hash = "zig_js-0.0.0-rjCAV7-GAADvMTBL7lPMuvDk7xgS9PCMIZWiOUXLZSlj",
.lazy = true,
},
.uucode = .{
// jacobsandlund/uucode
.url = "https://deps.files.ghostty.org/uucode-0.2.0-ZZjBPqZVVABQepOqZHR7vV_NcaN-wats0IB6o-Exj6m9.tar.gz",
.hash = "uucode-0.2.0-ZZjBPqZVVABQepOqZHR7vV_NcaN-wats0IB6o-Exj6m9",
.url = "https://github.com/jacobsandlund/uucode/archive/2826a37a4562284fdacd8fa029d49509cc9bffcd.tar.gz",
.hash = "uucode-0.2.0-ZZjBPlK5VADj7fdoq7G8LIHzD5o6FSkcBXXrRWr4jnrA",
},
.zig_wayland = .{
// codeberg ifreund/zig-wayland
.url = "https://deps.files.ghostty.org/zig_wayland-1b5c038ec10da20ed3a15b0b2a6db1c21383e8ea.tar.gz",
.hash = "wayland-0.5.0-dev-lQa1khrMAQDJDwYFKpdH3HizherB7sHo5dKMECfvxQHe",
.url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.6.0.tar.gz",
.hash = "wayland-0.6.0-lQa1kqz8AQADQmdNJsNhLoNHcnEGEUjrOaPV-dtEnEmX",
.lazy = true,
},
.zf = .{
// natecraddock/zf
.url = "https://deps.files.ghostty.org/zf-3c52637b7e937c5ae61fd679717da3e276765b23.tar.gz",
.hash = "zf-0.10.3-OIRy8RuJAACKA3Lohoumrt85nRbHwbpMcUaLES8vxDnh",
.url = "https://github.com/natecraddock/zf/archive/c35c421f84895193246db06c40683c1a30e616ef.tar.gz",
.hash = "zf-0.11.0-OIRy8X-RAAAwaRXHMYpj2uvBnuGTZWEE_3V7acqHQNtW",
.lazy = true,
},
.gobject = .{
// https://github.com/ghostty-org/zig-gobject based on zig_gobject
// Temporary until we generate them at build time automatically.
.url = "https://deps.files.ghostty.org/gobject-2025-11-08-23-1.tar.zst",
.hash = "gobject-0.3.0-Skun7ANLnwDvEfIpVmohcppXgOvg_I6YOJFmPIsKfXk-",
.url = "https://github.com/ghostty-org/zig-gobject/releases/download/0.8.0-2026-04-23-26-1/ghostty-gobject-0.8.0-2026-04-23-26-1.tar.zst",
.hash = "gobject-0.3.1-Skun7E1KnwBGMX5nslHYG1yWHaSevywxQO8oM7tTOgIp",
.lazy = true,
},

Expand Down
78 changes: 44 additions & 34 deletions build.zig.zon.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading