Skip to content

Commit 7e2286e

Browse files
committed
Zig 0.14
1 parent 95daca6 commit 7e2286e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+288
-290
lines changed

build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const builtin = @import("builtin");
33
const buildpkg = @import("src/build/main.zig");
44

55
comptime {
6-
buildpkg.requireZig("0.13.0");
6+
buildpkg.requireZig("0.14.0");
77
}
88

99
pub fn build(b: *std.Build) !void {
@@ -50,7 +50,7 @@ pub fn build(b: *std.Build) !void {
5050
// As such, these build steps are lacking. For example, the Darwin
5151
// build only produces an xcframework.
5252
if (config.app_runtime == .none) {
53-
if (config.target.result.isDarwin()) darwin: {
53+
if (config.target.result.os.tag.isDarwin()) darwin: {
5454
if (!config.emit_xcframework) break :darwin;
5555

5656
// Build the xcframework

build.zig.zon

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
.{
2-
.name = "ghostty",
2+
.name = .ghostty,
33
.version = "1.1.3",
44
.paths = .{""},
5+
.fingerprint = 0x64407a2a0b4147e5,
56
.dependencies = .{
67
// Zig libs
78

89
.libxev = .{
910
// mitchellh/libxev
10-
.url = "https://github.com/mitchellh/libxev/archive/8943932a668f338cb2c500f6e1a7396bacd8b55d.tar.gz",
11-
.hash = "1220a67b584c9499154de8c96851ed8e92315452cb2027c06e2d7d07a39c6f900d1a",
11+
.url = "https://github.com/mitchellh/libxev/archive/3df9337a9e84450a58a2c4af434ec1a036f7b494.tar.gz",
12+
.hash = "1220db2cfd2f8a1527d4c86cc4d298e0624481ae8112bee8c87a73baee0746797d66",
1213
},
1314
.mach_glfw = .{
1415
// mitchellh/mach-glfw
15-
.url = "https://deps.files.ghostty.org/mach_glfw-12206ed982e709e565d536ce930701a8c07edfd2cfdce428683f3f2a601d37696a62.tar.gz",
16-
.hash = "12206ed982e709e565d536ce930701a8c07edfd2cfdce428683f3f2a601d37696a62",
16+
.url = "https://github.com/mitchellh/mach-glfw/archive/112fc46340f5c8527e072e442e0375004303e82b.zip",
17+
.hash = "12206ed982e709e565d536ce930701a8c07edfd2cfdce428683f3f2a601d37696a63",
1718
.lazy = true,
1819
},
1920
.vaxis = .{
2021
// rockorager/libvaxis
21-
.url = "git+https://github.com/rockorager/libvaxis#2237a7059eae99e9f132dd5acd1555e49d6c7d93",
22-
.hash = "1220f5aec880d4f430cc1597ede88f1530da69e39a4986080e976b0c7b919c2ebfeb",
22+
.url = "git+https://github.com/rockorager/libvaxis#1e24e0dfb509e974e1c8713bcd119d0ae032a8c7",
23+
.hash = "vaxis-0.1.0-BWNV_MHyCAARemSCSwwc3sA1etNgv7ge0BCIXspX6CZv",
2324
},
2425
.z2d = .{
2526
// vancluever/z2d
26-
.url = "https://deps.files.ghostty.org/z2d-12201f0d542e7541cf492a001d4d0d0155c92f58212fbcb0d224e95edeba06b5416a.tar.gz",
27-
.hash = "12201f0d542e7541cf492a001d4d0d0155c92f58212fbcb0d224e95edeba06b5416a",
27+
.url = "https://github.com/vancluever/z2d/archive/03f6ef642e696dce8c6019d4365234d9538eea5d.tar.gz",
28+
.hash = "z2d-0.1.0-AAAAAMz7BwCFCN76WmSoRhlTe8ZOgPMmG44AyXxBEpHs",
2829
},
2930
.zig_objc = .{
3031
// mitchellh/zig-objc
31-
.url = "https://deps.files.ghostty.org/zig_objc-1220e17e64ef0ef561b3e4b9f3a96a2494285f2ec31c097721bf8c8677ec4415c634.tar.gz",
32-
.hash = "1220e17e64ef0ef561b3e4b9f3a96a2494285f2ec31c097721bf8c8677ec4415c634",
32+
.url = "https://github.com/mitchellh/zig-objc/archive/2329503f692fd5c8ff4c0528b066a22c40dc58e8.tar.gz",
33+
.hash = "1220458700f3a8319286715099ec64a787c77124da7c0f52fcbae13c40beeab8fe58",
3334
},
3435
.zig_js = .{
3536
// mitchellh/zig-js
@@ -42,13 +43,13 @@
4243
},
4344
.zig_wayland = .{
4445
// codeberg ifreund/zig-wayland
45-
.url = "https://deps.files.ghostty.org/zig-wayland-fbfe3b4ac0b472a27b1f1a67405436c58cbee12d.tar.gz",
46-
.hash = "12209ca054cb1919fa276e328967f10b253f7537c4136eb48f3332b0f7cf661cad38",
46+
.url = "https://codeberg.org/ifreund/zig-wayland/archive/f3c5d503e540ada8cbcb056420de240af0c094f7.tar.gz",
47+
.hash = "1220a686142edf1174287fbde3e4f378c5cea9f9cfd3e0e0e96cb2bcde0e9d5dcaa8",
4748
},
4849
.zf = .{
4950
// natecraddock/zf
50-
.url = "https://deps.files.ghostty.org/zf-1220edc3b8d8bedbb50555947987e5e8e2f93871ca3c8e8d4cc8f1377c15b5dd35e8.tar.gz",
51-
.hash = "1220edc3b8d8bedbb50555947987e5e8e2f93871ca3c8e8d4cc8f1377c15b5dd35e8",
51+
.url = "https://github.com/natecraddock/zf/archive/03176fcf23fda543cc02a8675e92c1fe3b1ee2eb.tar.gz",
52+
.hash = "zf-0.10.3-OIRy8bKIAACV6JaNNncXA68Nw2BUAD9JVfQdzjyoZQ-J",
5253
},
5354
.gobject = .{
5455
// ianprime0509/zig-gobject

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
5050
in {
5151
devShell.${system} = pkgs-stable.callPackage ./nix/devShell.nix {
52-
zig = zig.packages.${system}."0.13.0";
52+
zig = zig.packages.${system}."0.14.0";
5353
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
5454
zig2nix = zig2nix;
5555
};

pkg/apple-sdk/build.zig.zon

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.{
2-
.name = "apple-sdk",
2+
.name = .apple_sdk,
33
.version = "0.1.0",
44
.dependencies = .{},
5+
.fingerprint = 0xdde52860f7c464d2,
6+
.paths = .{""},
57
}

pkg/breakpad/build.zig

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ pub fn build(b: *std.Build) !void {
1414
lib.linkLibCpp();
1515
lib.addIncludePath(upstream.path("src"));
1616
lib.addIncludePath(b.path("vendor"));
17-
if (target.result.isDarwin()) {
17+
if (target.result.os.tag.isDarwin()) {
1818
const apple_sdk = @import("apple_sdk");
19-
try apple_sdk.addPaths(b, &lib.root_module);
19+
try apple_sdk.addPaths(b, lib.root_module);
2020
}
2121

2222
var flags = std.ArrayList([]const u8).init(b.allocator);
@@ -29,7 +29,7 @@ pub fn build(b: *std.Build) !void {
2929
.flags = flags.items,
3030
});
3131

32-
if (target.result.isDarwin()) {
32+
if (target.result.os.tag.isDarwin()) {
3333
lib.addCSourceFiles(.{
3434
.root = upstream.path(""),
3535
.files = common_apple,

pkg/cimgui/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ pub fn build(b: *std.Build) !void {
7676
.flags = flags.items,
7777
});
7878

79-
if (target.result.isDarwin()) {
79+
if (target.result.os.tag.isDarwin()) {
8080
if (!target.query.isNative()) {
81-
try @import("apple_sdk").addPaths(b, &lib.root_module);
81+
try @import("apple_sdk").addPaths(b, lib.root_module);
8282
try @import("apple_sdk").addPaths(b, module);
8383
}
8484
lib.addCSourceFile(.{

pkg/freetype/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
6969
});
7070
lib.linkLibC();
7171
lib.addIncludePath(upstream.path("include"));
72-
if (target.result.isDarwin()) {
72+
if (target.result.os.tag.isDarwin()) {
7373
const apple_sdk = @import("apple_sdk");
74-
try apple_sdk.addPaths(b, &lib.root_module);
74+
try apple_sdk.addPaths(b, lib.root_module);
7575
}
7676

7777
module.addIncludePath(upstream.path("include"));

pkg/glslang/build.zig

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn build(b: *std.Build) !void {
1616

1717
module.addIncludePath(upstream.path(""));
1818
module.addIncludePath(b.path("override"));
19-
if (target.result.isDarwin()) {
19+
if (target.result.os.tag.isDarwin()) {
2020
const apple_sdk = @import("apple_sdk");
2121
try apple_sdk.addPaths(b, module);
2222
}
@@ -53,9 +53,9 @@ fn buildGlslang(
5353
lib.linkLibCpp();
5454
lib.addIncludePath(upstream.path(""));
5555
lib.addIncludePath(b.path("override"));
56-
if (target.result.isDarwin()) {
56+
if (target.result.os.tag.isDarwin()) {
5757
const apple_sdk = @import("apple_sdk");
58-
try apple_sdk.addPaths(b, &lib.root_module);
58+
try apple_sdk.addPaths(b, lib.root_module);
5959
}
6060

6161
var flags = std.ArrayList([]const u8).init(b.allocator);

pkg/gtk4-layer-shell/build.zig.zon

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.{
2-
.name = "gtk4-layer-shell",
2+
.name = .gtk4_layer_shell,
33
.version = "1.1.0",
4+
.fingerprint = 0x4b96f9483c6feeb1,
45
.paths = .{""},
56
.dependencies = .{
67
.gtk4_layer_shell = .{

pkg/harfbuzz/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
9595
lib.addIncludePath(upstream.path("src"));
9696
module.addIncludePath(upstream.path("src"));
9797

98-
if (target.result.isDarwin()) {
99-
try apple_sdk.addPaths(b, &lib.root_module);
98+
if (target.result.os.tag.isDarwin()) {
99+
try apple_sdk.addPaths(b, lib.root_module);
100100
try apple_sdk.addPaths(b, module);
101101
}
102102

pkg/highway/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ pub fn build(b: *std.Build) !void {
2121
lib.addIncludePath(upstream.path(""));
2222
module.addIncludePath(upstream.path(""));
2323

24-
if (target.result.isDarwin()) {
24+
if (target.result.os.tag.isDarwin()) {
2525
const apple_sdk = @import("apple_sdk");
26-
try apple_sdk.addPaths(b, &lib.root_module);
26+
try apple_sdk.addPaths(b, lib.root_module);
2727
try apple_sdk.addPaths(b, module);
2828
}
2929

pkg/libintl/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ pub fn build(b: *std.Build) !void {
4242
lib.addIncludePath(upstream.path("gettext-runtime/intl"));
4343
lib.addIncludePath(upstream.path("gettext-runtime/intl/gnulib-lib"));
4444

45-
if (target.result.isDarwin()) {
45+
if (target.result.os.tag.isDarwin()) {
4646
const apple_sdk = @import("apple_sdk");
47-
try apple_sdk.addPaths(b, &lib.root_module);
47+
try apple_sdk.addPaths(b, lib.root_module);
4848
}
4949

5050
lib.addCSourceFiles(.{

pkg/libpng/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pub fn build(b: *std.Build) !void {
1515
if (target.result.os.tag == .linux) {
1616
lib.linkSystemLibrary("m");
1717
}
18-
if (target.result.isDarwin()) {
18+
if (target.result.os.tag.isDarwin()) {
1919
const apple_sdk = @import("apple_sdk");
20-
try apple_sdk.addPaths(b, &lib.root_module);
20+
try apple_sdk.addPaths(b, lib.root_module);
2121
}
2222

2323
// For dynamic linking, we prefer dynamic linking and to search by

pkg/libxml2/build.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub fn build(b: *std.Build) !void {
6666
// it to the `LIBXML_{field}_ENABLED` C define where field is uppercased.
6767
inline for (std.meta.fields(Options)) |field| {
6868
const opt = b.option(bool, field.name, "Configure flag") orelse
69-
@as(*const bool, @ptrCast(field.default_value.?)).*;
69+
@as(*const bool, @ptrCast(field.default_value_ptr.?)).*;
7070
if (opt) {
7171
var nameBuf: [32]u8 = undefined;
7272
const name = std.ascii.upperString(&nameBuf, field.name);

pkg/macos/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ pub fn build(b: *std.Build) !void {
3838
module.linkFramework("Carbon", .{});
3939
}
4040

41-
if (target.result.isDarwin()) {
41+
if (target.result.os.tag.isDarwin()) {
4242
module.linkFramework("CoreFoundation", .{});
4343
module.linkFramework("CoreGraphics", .{});
4444
module.linkFramework("CoreText", .{});
4545
module.linkFramework("CoreVideo", .{});
4646
module.linkFramework("QuartzCore", .{});
4747

4848
if (!target.query.isNative()) {
49-
try apple_sdk.addPaths(b, &lib.root_module);
49+
try apple_sdk.addPaths(b, lib.root_module);
5050
try apple_sdk.addPaths(b, module);
5151
}
5252
}

pkg/oniguruma/build.zig

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
6868
lib.addIncludePath(upstream.path("src"));
6969
module.addIncludePath(upstream.path("src"));
7070

71-
if (target.result.isDarwin()) {
71+
if (target.result.os.tag.isDarwin()) {
7272
const apple_sdk = @import("apple_sdk");
73-
try apple_sdk.addPaths(b, &lib.root_module);
73+
try apple_sdk.addPaths(b, lib.root_module);
7474
}
7575

7676
lib.addConfigHeader(b.addConfigHeader(.{
@@ -88,10 +88,10 @@ fn buildLib(b: *std.Build, module: *std.Build.Module, options: anytype) !*std.Bu
8888
.HAVE_SYS_TYPES_H = true,
8989
.HAVE_UNISTD_H = true,
9090
.HAVE_INTTYPES_H = true,
91-
.SIZEOF_INT = t.c_type_byte_size(.int),
92-
.SIZEOF_LONG = t.c_type_byte_size(.long),
93-
.SIZEOF_LONG_LONG = t.c_type_byte_size(.longlong),
94-
.SIZEOF_VOIDP = t.ptrBitWidth() / t.c_type_bit_size(.char),
91+
.SIZEOF_INT = t.cTypeByteSize(.int),
92+
.SIZEOF_LONG = t.cTypeByteSize(.long),
93+
.SIZEOF_LONG_LONG = t.cTypeByteSize(.longlong),
94+
.SIZEOF_VOIDP = t.ptrBitWidth() / t.cTypeByteSize(.char),
9595
}));
9696

9797
var flags = std.ArrayList([]const u8).init(b.allocator);

pkg/sentry/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ pub fn build(b: *std.Build) !void {
2323
lib.linkLibC();
2424
lib.addIncludePath(upstream.path("include"));
2525
lib.addIncludePath(upstream.path("src"));
26-
if (target.result.isDarwin()) {
26+
if (target.result.os.tag.isDarwin()) {
2727
const apple_sdk = @import("apple_sdk");
28-
try apple_sdk.addPaths(b, &lib.root_module);
28+
try apple_sdk.addPaths(b, lib.root_module);
2929
try apple_sdk.addPaths(b, module);
3030
}
3131

pkg/simdutf/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ pub fn build(b: *std.Build) !void {
1212
lib.linkLibCpp();
1313
lib.addIncludePath(b.path("vendor"));
1414

15-
if (target.result.isDarwin()) {
15+
if (target.result.os.tag.isDarwin()) {
1616
const apple_sdk = @import("apple_sdk");
17-
try apple_sdk.addPaths(b, &lib.root_module);
17+
try apple_sdk.addPaths(b, lib.root_module);
1818
}
1919

2020
var flags = std.ArrayList([]const u8).init(b.allocator);

pkg/spirv-cross/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ fn buildSpirvCross(
4242
});
4343
lib.linkLibC();
4444
lib.linkLibCpp();
45-
if (target.result.isDarwin()) {
45+
if (target.result.os.tag.isDarwin()) {
4646
const apple_sdk = @import("apple_sdk");
47-
try apple_sdk.addPaths(b, &lib.root_module);
47+
try apple_sdk.addPaths(b, lib.root_module);
4848
}
4949

5050
var flags = std.ArrayList([]const u8).init(b.allocator);

pkg/spirv-cross/build.zig.zon

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.{
2-
.name = "spirv-cross",
2+
.name = .spirv_cross,
33
.version = "13.1.1",
4+
.fingerprint = 0x7ea1d8312b06cca,
45
.paths = .{""},
56
.dependencies = .{
67
// KhronosGroup/SPIRV-Cross

pkg/utfcpp/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ pub fn build(b: *std.Build) !void {
1414
lib.linkLibCpp();
1515
lib.addIncludePath(upstream.path(""));
1616

17-
if (target.result.isDarwin()) {
17+
if (target.result.os.tag.isDarwin()) {
1818
const apple_sdk = @import("apple_sdk");
19-
try apple_sdk.addPaths(b, &lib.root_module);
19+
try apple_sdk.addPaths(b, lib.root_module);
2020
}
2121

2222
var flags = std.ArrayList([]const u8).init(b.allocator);

pkg/wuffs/build.zig

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn build(b: *std.Build) !void {
1313
.link_libc = true,
1414
});
1515

16-
if (target.result.isDarwin()) {
16+
if (target.result.os.tag.isDarwin()) {
1717
const apple_sdk = @import("apple_sdk");
1818
try apple_sdk.addPaths(b, module);
1919
}

pkg/zlib/build.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ pub fn build(b: *std.Build) !void {
1313
});
1414
lib.linkLibC();
1515
lib.addIncludePath(upstream.path(""));
16-
if (target.result.isDarwin()) {
16+
if (target.result.os.tag.isDarwin()) {
1717
const apple_sdk = @import("apple_sdk");
18-
try apple_sdk.addPaths(b, &lib.root_module);
18+
try apple_sdk.addPaths(b, lib.root_module);
1919
}
2020

2121
lib.installHeadersDirectory(

0 commit comments

Comments
 (0)