chore: update to Zig v2024.1.0-mach

This commit is contained in:
Rekai Nyangadzayi Musuka 2024-01-17 16:27:02 -06:00
parent b0389bb1a4
commit 7a95a1fac0
3 changed files with 12 additions and 6 deletions

View File

@ -16,7 +16,7 @@ jobs:
steps: steps:
- uses: goto-bus-stop/setup-zig@v2 - uses: goto-bus-stop/setup-zig@v2
with: with:
version: master version: 0.12.0-dev.2063+804cee3b9
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: zig fmt src/*.zig - run: zig fmt src/*.zig
test: test:
@ -27,7 +27,7 @@ jobs:
steps: steps:
- uses: goto-bus-stop/setup-zig@v2 - uses: goto-bus-stop/setup-zig@v2
with: with:
version: master version: 0.12.0-dev.2063+804cee3b9
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: zig build test - run: zig build test
bench: bench:
@ -35,6 +35,6 @@ jobs:
steps: steps:
- uses: goto-bus-stop/setup-zig@v2 - uses: goto-bus-stop/setup-zig@v2
with: with:
version: master version: 0.12.0-dev.2063+804cee3b9
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: zig build -Doptimize=ReleaseFast -Dcpu=baseline bench - run: zig build -Doptimize=ReleaseFast -Dcpu=baseline bench

View File

@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize. // set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
const hamt_module = b.addModule("hamt", .{ .source_file = .{ .path = "src/lib.zig" } }); const mod = b.addModule("hamt", .{ .root_source_file = .{ .path = "src/lib.zig" } });
const lib = b.addStaticLibrary(.{ const lib = b.addStaticLibrary(.{
.name = "hamt", .name = "hamt",
@ -36,9 +36,9 @@ pub fn build(b: *std.Build) void {
.name = "hamt-benchmark", .name = "hamt-benchmark",
.root_source_file = .{ .path = "src/bench.zig" }, .root_source_file = .{ .path = "src/bench.zig" },
.target = target, .target = target,
.optimize = optimize, .optimize = .ReleaseFast,
}); });
bench.addModule("hamt", hamt_module); bench.root_module.addImport("hamt", mod);
const bench_cmd = b.addRunArtifact(bench); const bench_cmd = b.addRunArtifact(bench);
const bench_step = b.step("bench", "Run benchmark"); const bench_step = b.step("bench", "Run benchmark");

View File

@ -1,5 +1,11 @@
.{ .{
.name = "hamt", .name = "hamt",
.version = "0.1.0", .version = "0.1.0",
.paths = .{
"build.zig",
"build.zig.zon",
"README.md",
"src",
},
.dependencies = .{}, .dependencies = .{},
} }