Skip to content

Commit 9d8d7d9

Browse files
committed
🚀 Support of zig 0.13.0
1 parent 075a799 commit 9d8d7d9

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
### zig ###
55
# Zig programming language
66

7+
.zig-cache/
78
zig-cache/
89
zig-out/
910
build/

‎build.zig‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66

7-
_ = b.addModule("chroma", .{ .root_source_file = .{ .path = "src/lib.zig" } });
7+
_ = b.addModule("chroma", .{ .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/lib.zig" } } });
88

99
const lib = b.addStaticLibrary(.{
1010
.name = "chroma",
11-
.root_source_file = .{ .path = "src/lib.zig" },
11+
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/lib.zig" } },
1212
.target = target,
1313
.optimize = optimize,
1414
});
@@ -17,7 +17,7 @@ pub fn build(b: *std.Build) void {
1717

1818
const exe = b.addExecutable(.{
1919
.name = "chroma",
20-
.root_source_file = .{ .path = "src/main.zig" },
20+
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/main.zig" } },
2121
.target = target,
2222
.optimize = optimize,
2323
});
@@ -36,15 +36,15 @@ pub fn build(b: *std.Build) void {
3636
run_step.dependOn(&run_cmd.step);
3737

3838
const lib_unit_tests = b.addTest(.{
39-
.root_source_file = .{ .path = "src/lib.zig" },
39+
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/lib.zig" } },
4040
.target = target,
4141
.optimize = optimize,
4242
});
4343

4444
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
4545

4646
const exe_unit_tests = b.addTest(.{
47-
.root_source_file = .{ .path = "src/main.zig" },
47+
.root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/main.zig" } },
4848
.target = target,
4949
.optimize = optimize,
5050
});

‎build.zig.zon‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.name = "chroma",
33
// This is a [Semantic Version](https://semver.org/).
44
// In a future version of Zig it will be used for package deduplication.
5-
.version = "0.1.1",
5+
.version = "0.1.2",
66

77
// This field is optional.
88
// This is currently advisory only; Zig does not yet do anything
99
// with this value.
10-
.minimum_zig_version = "0.12.0",
10+
.minimum_zig_version = "0.13.0",
1111

1212
// This field is optional.
1313
// Each dependency must either provide a `url` and `hash`, or a `path`.

0 commit comments

Comments
 (0)