mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-27 09:31:39 +00:00
Update to Zig 0.16.0
This commit represents the majority of the work necessary to upgrade Ghostty to use Zig 0.16.0. Key parts: * In addition to its previous responsibilities, the global state now houses state for global I/O implementations and the process environment. It is now also utilized in the main application along with the C library. Where necessary, global state is isolated from key parts of the implementation (e.g., in libghostty subsystems), and it's expected that this list will grow. * We currently manage our own C translation layer where necessary. In these cases, cImport has been removed in favor of the new external translate-c package. Due to fixes that have needed be made to properly translate the dependencies that were swapped out, as mentioned, we have had to backport fixes from the current translate-c package (and the upstream Arocc dependency). We will host this ourselves until Zig 0.17.0 is released with these fixes. * Where necessary (only a small number of cases), some stdlib code from 0.15.2 (and even from 0.17.0) has been taken, adopted, and vendored in lib/compat. Co-authored-by: Leah Amelia Chen <hi@pluie.me>
This commit is contained in:
34
.github/workflows/test.yml
vendored
34
.github/workflows/test.yml
vendored
@@ -335,7 +335,7 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Xcode Select
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.3.app
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.6.app
|
||||
|
||||
- name: Build XCFramework
|
||||
run: nix develop -c zig build -Demit-lib-vt
|
||||
@@ -645,7 +645,7 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Xcode Select
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.3.app
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.6.app
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
@@ -1077,7 +1077,7 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Xcode Select
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.3.app
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.6.app
|
||||
|
||||
- name: Xcode Version
|
||||
run: xcodebuild -version
|
||||
@@ -1137,7 +1137,7 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Xcode Select
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.3.app
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.6.app
|
||||
|
||||
- name: Xcode Version
|
||||
run: xcodebuild -version
|
||||
@@ -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'
|
||||
@@ -1377,7 +1397,7 @@ jobs:
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
|
||||
- name: Xcode Select
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.3.app
|
||||
run: sudo xcode-select -s /Applications/Xcode_26.6.app
|
||||
|
||||
- name: Xcode Version
|
||||
run: xcodebuild -version
|
||||
|
||||
Reference in New Issue
Block a user