Update to Zig 0.17.0

This commit is contained in:
ktkk 2026-10-28 10:11:11 +00:00
parent 8ff4bf15f4
commit 8e2cd4d7a2
3 changed files with 10 additions and 12 deletions

View file

@ -18,9 +18,7 @@ pub fn build(b: *std.Build) void {
const run_cmd = b.addRunArtifact(exe); const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep()); run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| { run_cmd.addPassthruArgs();
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app"); const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step); run_step.dependOn(&run_cmd.step);

12
flake.lock generated
View file

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1791914995,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1781577229, "lastModified": 1793110635,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", "narHash": "sha256-dhoW6VgFWlaodSY5jrBn+CF2FLmaUvDVgM7+C7T2+NM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "rev": "31ecbaca1bdefa45dffc409f0250bd8039ea0010",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -34,13 +34,13 @@ pub fn EnumFlags(comptime E: type) type {
pub fn format(self: *const Self, w: *std.Io.Writer) std.Io.Writer.Error!void { pub fn format(self: *const Self, w: *std.Io.Writer) std.Io.Writer.Error!void {
var index: usize = 0; var index: usize = 0;
inline for (std.meta.fields(E)) |field| { inline for (@typeInfo(E).@"enum".field_names) |field| {
const key = @field(E, field.name); const key = @field(E, field);
if (self.contains(key)) { if (self.contains(key)) {
if (index > 0) { if (index > 0) {
_ = try w.write(" | "); _ = try w.write(" | ");
} }
try w.print("{s}", .{ field.name }); try w.print("{s}", .{ field });
index += 1; index += 1;
} }
} }