Skip to content

Commit a85b53f

Browse files
gwenzekhugomano
andauthored
zig 0.14.0 (zml#189)
Co-authored-by: Hugo Mano <[email protected]>
1 parent 5bb1d46 commit a85b53f

Some content is hidden

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

49 files changed

+487
-313
lines changed

.github/workflows/commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
pull_request:
99

1010
env:
11-
ZIG_VERSION: 0.13.0
11+
ZIG_VERSION: 0.14.0
1212
BAZELISK_VERSION: 1.25.0
1313

1414
concurrency:

MODULE.bazel

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ bazel_dep(name = "aspect_bazel_lib", version = "2.11.0")
99
bazel_dep(name = "aspect_rules_py", version = "1.3.1")
1010
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1111
bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.1")
12-
bazel_dep(name = "libxev", version = "20250222.0-07bcffa")
12+
bazel_dep(name = "libxev", version = "20250313.0-5773f46")
1313
bazel_dep(name = "llvm-raw", version = "20250217.0-0e779ad")
1414
bazel_dep(name = "patchelf", version = "0.18.0")
1515
bazel_dep(name = "pcre2", version = "10.43")
@@ -27,7 +27,7 @@ bazel_dep(name = "stablehlo", version = "20250217.0-4598975")
2727
bazel_dep(name = "toolchains_protoc", version = "0.3.7")
2828
bazel_dep(name = "with_cfg.bzl", version = "0.8.0")
2929
bazel_dep(name = "xla", version = "20250204.1-6789523")
30-
bazel_dep(name = "zig-protobuf", version = "20240722.0-c644d11")
30+
bazel_dep(name = "zig-protobuf", version = "20250213.0-5304067")
3131
bazel_dep(name = "zig-yaml", version = "20240903.0-83d5fdf")
3232

3333
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True)
@@ -47,9 +47,10 @@ register_toolchains("@toolchains_protoc_hub//:all")
4747

4848
zig = use_extension("@rules_zig//zig:extensions.bzl", "zig")
4949
zig.index(file = "//bazel:zig_index.json")
50-
zig.toolchain(zig_version = "0.14.0-dev.363+c3faae6bf")
50+
zig.toolchain(zig_version = "0.14.0")
5151
zig.mirrors(urls = [
5252
"https://mirror.zml.ai/zig",
53+
"https://ziglang.org/builds/",
5354
])
5455
use_repo(zig, "zig_toolchains")
5556

async/asyncio.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub fn sleep(exec: *Executor, ms: u64) !void {
8989
}
9090

9191
pub fn waitForCompletionOutsideCoro(exec: *Executor, c: *xev.Completion) !void {
92-
@setCold(true);
92+
@branchHint(.unlikely);
9393
while (c.state() != .dead) {
9494
try exec.tick();
9595
}

bazel/zig_index.json

Lines changed: 122 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,154 @@
11
{
22
"master": {
3-
"version": "0.14.0-dev.363+c3faae6bf",
4-
"date": "2024-07-18",
3+
"version": "0.15.0-dev.56+d0911786c",
4+
"date": "2025-03-12",
55
"docs": "https://ziglang.org/documentation/master/",
66
"stdDocs": "https://ziglang.org/documentation/master/std/",
77
"src": {
8-
"tarball": "https://ziglang.org/builds/zig-0.14.0-dev.363+c3faae6bf.tar.xz",
9-
"shasum": "55b48780575ee86668fe9e8119abcc0831d3ce93f5f848b7a9b610155c1a865e",
10-
"size": "17272356"
8+
"tarball": "https://ziglang.org/builds/zig-0.15.0-dev.56+d0911786c.tar.xz",
9+
"shasum": "5f10f2763bc19ad540844821891b17981ac40d205d34f93679af732d90079c19",
10+
"size": "17775980"
1111
},
1212
"bootstrap": {
13-
"tarball": "https://ziglang.org/builds/zig-bootstrap-0.14.0-dev.363+c3faae6bf.tar.xz",
14-
"shasum": "65cd278494293ff953561194607c4b7e9b96908aa903c7a8421f4e8014a6345b",
15-
"size": "46507328"
13+
"tarball": "https://ziglang.org/builds/zig-bootstrap-0.15.0-dev.56+d0911786c.tar.xz",
14+
"shasum": "f4cb749d63db2a11f3d087ce7607ae1a26dfc1049a554147d7a60f7327f17ef8",
15+
"size": "48043388"
1616
},
1717
"x86_64-macos": {
18-
"tarball": "https://ziglang.org/builds/zig-macos-x86_64-0.14.0-dev.363+c3faae6bf.tar.xz",
19-
"shasum": "256b09afa6a4e0cd5c4f8497ef3625ba9b01de2b75f57b728337bc1de4681c9c",
20-
"size": "48937384"
18+
"tarball": "https://ziglang.org/builds/zig-macos-x86_64-0.15.0-dev.56+d0911786c.tar.xz",
19+
"shasum": "a737bf40b6b4627833c2346f4d1ab63c387e16e70c535cec421029efbf792826",
20+
"size": "51066200"
2121
},
2222
"aarch64-macos": {
23-
"tarball": "https://ziglang.org/builds/zig-macos-aarch64-0.14.0-dev.363+c3faae6bf.tar.xz",
24-
"shasum": "cd9f563150b1adb7306912b5acff9b00e39ef283075a42b95186f39bda656862",
25-
"size": "44960052"
23+
"tarball": "https://ziglang.org/builds/zig-macos-aarch64-0.15.0-dev.56+d0911786c.tar.xz",
24+
"shasum": "ef8f0429fa663c55807a60c3931fddc971276dd4570ca794a81c20c6cabfb56d",
25+
"size": "45933112"
2626
},
2727
"x86_64-linux": {
28-
"tarball": "https://ziglang.org/builds/zig-linux-x86_64-0.14.0-dev.363+c3faae6bf.tar.xz",
29-
"shasum": "98ce531beaac0e683713ec1843023b8aa81a318686472ff13f2c075f0362bf0a",
30-
"size": "47164832"
28+
"tarball": "https://ziglang.org/builds/zig-linux-x86_64-0.15.0-dev.56+d0911786c.tar.xz",
29+
"shasum": "54ef448d32520ca10641f18c4e0a4393f762461d1e351ff075683c391951628d",
30+
"size": "49113412"
3131
},
3232
"aarch64-linux": {
33-
"tarball": "https://ziglang.org/builds/zig-linux-aarch64-0.14.0-dev.363+c3faae6bf.tar.xz",
34-
"shasum": "81e1c06740c017ad8aa3df451c544da17a2e23440c1e695954b8c4b612243af0",
35-
"size": "43190732"
33+
"tarball": "https://ziglang.org/builds/zig-linux-aarch64-0.15.0-dev.56+d0911786c.tar.xz",
34+
"shasum": "55234d068a5a60851c39052431037762fb3447af691751f826c6faf5ab7d0850",
35+
"size": "44950392"
3636
},
3737
"armv7a-linux": {
38-
"tarball": "https://ziglang.org/builds/zig-linux-armv7a-0.14.0-dev.363+c3faae6bf.tar.xz",
39-
"shasum": "cda6c3f2b51355c3f117814c13962c9fd65d9ba02f5981d45ea83c135b9019b6",
40-
"size": "44096460"
38+
"tarball": "https://ziglang.org/builds/zig-linux-armv7a-0.15.0-dev.56+d0911786c.tar.xz",
39+
"shasum": "eae58573a8a9c1744782d3c73c930ee97de98f506c8a814eeb27c69b3bd7412c",
40+
"size": "46124004"
4141
},
4242
"riscv64-linux": {
43-
"tarball": "https://ziglang.org/builds/zig-linux-riscv64-0.14.0-dev.363+c3faae6bf.tar.xz",
44-
"shasum": "aa488f1763ff65a910c8f6bdedc5ff8b9a05225d8b29a1446e3c0e0cb7bff683",
45-
"size": "45637416"
43+
"tarball": "https://ziglang.org/builds/zig-linux-riscv64-0.15.0-dev.56+d0911786c.tar.xz",
44+
"shasum": "66112eecb04e26dbed26eec0f39fc3609814ad75744f0e46aaa70d8367a6bea3",
45+
"size": "48093348"
4646
},
4747
"powerpc64le-linux": {
48-
"tarball": "https://ziglang.org/builds/zig-linux-powerpc64le-0.14.0-dev.363+c3faae6bf.tar.xz",
49-
"shasum": "8e9f715b53edf8d8b8c0d9dcc173a1faafdb3b659cebe4435d19d2b2ef24eda9",
50-
"size": "46654844"
48+
"tarball": "https://ziglang.org/builds/zig-linux-powerpc64le-0.15.0-dev.56+d0911786c.tar.xz",
49+
"shasum": "2986e5244781677abf4dd8e90c5e049f8f59e6a759984214a9b6763645d49241",
50+
"size": "48754240"
5151
},
5252
"x86-linux": {
53-
"tarball": "https://ziglang.org/builds/zig-linux-x86-0.14.0-dev.363+c3faae6bf.tar.xz",
54-
"shasum": "4633ce74826903cf019f390956726c434a5b032f06931aa085e0b22194b55bb5",
55-
"size": "52144844"
53+
"tarball": "https://ziglang.org/builds/zig-linux-x86-0.15.0-dev.56+d0911786c.tar.xz",
54+
"shasum": "b01d947a285d6504539b05747616545c45c3cf5653f3f6926d6a1a141e387283",
55+
"size": "51633580"
56+
},
57+
"loongarch64-linux": {
58+
"tarball": "https://ziglang.org/builds/zig-linux-loongarch64-0.15.0-dev.56+d0911786c.tar.xz",
59+
"shasum": "7e09d716da24da8b0098af72dacf3bb1ee35de1c09478b2fef06e74db5a5da4a",
60+
"size": "45856620"
61+
},
62+
"x86_64-windows": {
63+
"tarball": "https://ziglang.org/builds/zig-windows-x86_64-0.15.0-dev.56+d0911786c.zip",
64+
"shasum": "05c71d9a820a883589fc34e2e82d49a7ce1263b5957d58ae83ab9f3de02aae14",
65+
"size": "82776510"
66+
},
67+
"aarch64-windows": {
68+
"tarball": "https://ziglang.org/builds/zig-windows-aarch64-0.15.0-dev.56+d0911786c.zip",
69+
"shasum": "f620259d96ab0d60725ce86dedfe11b1c061acdff1d5f4e4cae5806d9d9477a2",
70+
"size": "78667620"
71+
},
72+
"x86-windows": {
73+
"tarball": "https://ziglang.org/builds/zig-windows-x86-0.15.0-dev.56+d0911786c.zip",
74+
"shasum": "1592b059d91296b04c66b08a36951ced1582bfd37bc0cf6ab998c0231d0765a8",
75+
"size": "84520518"
76+
}
77+
},
78+
"0.14.0": {
79+
"date": "2025-03-05",
80+
"docs": "https://ziglang.org/documentation/0.14.0/",
81+
"stdDocs": "https://ziglang.org/documentation/0.14.0/std/",
82+
"notes": "https://ziglang.org/download/0.14.0/release-notes.html",
83+
"src": {
84+
"tarball": "https://ziglang.org/download/0.14.0/zig-0.14.0.tar.xz",
85+
"shasum": "c76638c03eb204c4432ae092f6fa07c208567e110fbd4d862d131a7332584046",
86+
"size": "17772188"
87+
},
88+
"bootstrap": {
89+
"tarball": "https://ziglang.org/download/0.14.0/zig-bootstrap-0.14.0.tar.xz",
90+
"shasum": "bf3fcb22be0b83f4791748adb567d3304779d66d7bf9b1bd557ef6c2e0232807",
91+
"size": "48029040"
92+
},
93+
"x86_64-macos": {
94+
"tarball": "https://ziglang.org/download/0.14.0/zig-macos-x86_64-0.14.0.tar.xz",
95+
"shasum": "685816166f21f0b8d6fc7aa6a36e91396dcd82ca6556dfbe3e329deffc01fec3",
96+
"size": "51039964"
97+
},
98+
"aarch64-macos": {
99+
"tarball": "https://ziglang.org/download/0.14.0/zig-macos-aarch64-0.14.0.tar.xz",
100+
"shasum": "b71e4b7c4b4be9953657877f7f9e6f7ee89114c716da7c070f4a238220e95d7e",
101+
"size": "45902412"
102+
},
103+
"x86_64-linux": {
104+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz",
105+
"shasum": "473ec26806133cf4d1918caf1a410f8403a13d979726a9045b421b685031a982",
106+
"size": "49091960"
107+
},
108+
"aarch64-linux": {
109+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-aarch64-0.14.0.tar.xz",
110+
"shasum": "ab64e3ea277f6fc5f3d723dcd95d9ce1ab282c8ed0f431b4de880d30df891e4f",
111+
"size": "44922728"
112+
},
113+
"armv7a-linux": {
114+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-armv7a-0.14.0.tar.xz",
115+
"shasum": "a67dbfa9bdf769228ec994f2098698c619f930883ca5ef638f50eee2d7788d10",
116+
"size": "46112980"
117+
},
118+
"riscv64-linux": {
119+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-riscv64-0.14.0.tar.xz",
120+
"shasum": "a2b14d3de326d3fd095548ef38bf5a67b15dadd62fbcc90836d63cc4355f8ef7",
121+
"size": "48069188"
122+
},
123+
"powerpc64le-linux": {
124+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-powerpc64le-0.14.0.tar.xz",
125+
"shasum": "3eabd60876ebc2748de8eb57b4b8cfa78861ba9bf7c6dd83f4e3e1d271d7c45e",
126+
"size": "48707620"
127+
},
128+
"x86-linux": {
129+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-x86-0.14.0.tar.xz",
130+
"shasum": "55d1ba21de5109686ffa675b9cc1dd66930093c202995a637ce3e397816e4c08",
131+
"size": "51621460"
132+
},
133+
"loongarch64-linux": {
134+
"tarball": "https://ziglang.org/download/0.14.0/zig-linux-loongarch64-0.14.0.tar.xz",
135+
"shasum": "31a2f07df55f8f528b92d540db9aae6c0b38643c34dc1ac33a0111d855e996ae",
136+
"size": "45821860"
56137
},
57138
"x86_64-windows": {
58-
"tarball": "https://ziglang.org/builds/zig-windows-x86_64-0.14.0-dev.363+c3faae6bf.zip",
59-
"shasum": "44a26238f1757723f54e9b5d4d08b508be8ebdfad9442218d0f2a3ae61f032a5",
60-
"size": "79857623"
139+
"tarball": "https://ziglang.org/download/0.14.0/zig-windows-x86_64-0.14.0.zip",
140+
"shasum": "f53e5f9011ba20bbc3e0e6d0a9441b31eb227a97bac0e7d24172f1b8b27b4371",
141+
"size": "82219809"
61142
},
62143
"aarch64-windows": {
63-
"tarball": "https://ziglang.org/builds/zig-windows-aarch64-0.14.0-dev.363+c3faae6bf.zip",
64-
"shasum": "8214699c48b5753d127f9632fbb78432fdfa1dd5715ff73106469b339bb641ef",
65-
"size": "75829556"
144+
"tarball": "https://ziglang.org/download/0.14.0/zig-windows-aarch64-0.14.0.zip",
145+
"shasum": "03e984383ebb8f85293557cfa9f48ee8698e7c400239570c9ff1aef3bffaf046",
146+
"size": "78113283"
66147
},
67148
"x86-windows": {
68-
"tarball": "https://ziglang.org/builds/zig-windows-x86-0.14.0-dev.363+c3faae6bf.zip",
69-
"shasum": "86be63cb2017f23371da631980b27ab6aa4a43b5d4ed96fd08f1311584d779a9",
70-
"size": "83972311"
149+
"tarball": "https://ziglang.org/download/0.14.0/zig-windows-x86-0.14.0.zip",
150+
"shasum": "1a867d808cf4fa9184358395d94441390b6b24ee8d00d356ca11ea7cbfd3a4ec",
151+
"size": "83970029"
71152
}
72153
},
73154
"0.13.0": {

examples/benchmark/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const asynk = @import("async");
55
const flags = stdx.flags;
66

77
// set log level to debug to print the generated IR
8-
pub const std_options = .{
8+
pub const std_options: std.Options = .{
99
.log_level = .warn,
1010
.logFn = asynk.logFn(std.log.defaultLog),
1111
};

examples/llama/llama.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ pub const KvCache = struct {
345345
}
346346

347347
pub fn keys(self: KvCache) Tensor {
348-
return self.k.dynamicSlice(.{ .layer = .{ .start = self.layer_index, .len = 1 } }).squeeze(.layer);
348+
return self.k.dynamicSlice(.{ .layer = Tensor.DynSlice{ .start = self.layer_index, .len = 1 } }).squeeze(.layer);
349349
}
350350

351351
pub fn values(self: KvCache) Tensor {
352-
return self.v.dynamicSlice(.{ .layer = .{ .start = self.layer_index, .len = 1 } }).squeeze(.layer);
352+
return self.v.dynamicSlice(.{ .layer = Tensor.DynSlice{ .start = self.layer_index, .len = 1 } }).squeeze(.layer);
353353
}
354354

355355
pub fn update(self: KvCache, new_k: Tensor, new_v: Tensor, token_index: ?Tensor) KvCache {

examples/llama/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ShapeOf = zml.ShapeOf;
1717

1818
const log = std.log.scoped(.llama);
1919

20-
pub const std_options = .{
20+
pub const std_options: std.Options = .{
2121
.log_level = .info,
2222
.logFn = asynk.logFn(std.log.defaultLog),
2323
};

examples/modernbert/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const stdx = @import("stdx");
99
const zml = @import("zml");
1010
const Tensor = zml.Tensor;
1111

12-
pub const std_options = .{
12+
pub const std_options: std.Options = .{
1313
.log_level = .info,
1414
.log_scope_levels = &[_]std.log.ScopeLevel{
1515
.{ .scope = .modernbert, .level = .info },

examples/third_party/non_module_deps.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def _non_module_deps_impl(mctx):
55
new_git_repository(
66
name = "com_github_hejsil_clap",
77
remote = "https://github.com/Hejsil/zig-clap.git",
8-
commit = "d71cc39a94f3e6ccbad00c25d350c9147de4df9f",
8+
commit = "068c38f89814079635692c7d0be9f58508c86173",
99
build_file = "//:third_party/com_github_hejsil_clap/clap.bazel",
1010
)
1111

mlir/mlir.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub const MlirStrCallback = fn (c.MlirStringRef, ?*anyopaque) callconv(.C) void;
5050

5151
fn MlirHelpersMethods(OuterT: type) type {
5252
switch (@typeInfo(OuterT)) {
53-
.Struct => |info| {
53+
.@"struct" => |info| {
5454
if (info.fields.len != 1) @compileError("Mlir wrapper type can only wrap one Mlir value. Received: " ++ @typeName(OuterT));
5555
},
5656
else => @compileError("MlirHelpersMethods is only available on an Mlir wrapper struct. Received: " ++ @typeName(OuterT)),

0 commit comments

Comments
 (0)