include build in build.zig.zon

This commit is contained in:
Emil Lerch 2026-10-04 10:48:44 -07:00
parent 4f48adaa18
commit 0d1b71a021
Signed by: lobo
GPG key ID: A7B62D657EF764F8
2 changed files with 5 additions and 4 deletions

View file

@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
// The public module. Consumers `@import("biff8")`. // The public module. Consumers `@import("biff8")`.
const mod = b.addModule("biff8", .{ const module = b.addModule("biff8", .{
.root_source_file = b.path("src/root.zig"), .root_source_file = b.path("src/root.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void {
// Tests: one binary rooted at src/root.zig. `refAllDecls` in // Tests: one binary rooted at src/root.zig. `refAllDecls` in
// root.zig's test block pulls in every file's tests through the // root.zig's test block pulls in every file's tests through the
// import graph. // import graph.
const tests = b.addTest(.{ .root_module = mod }); const tests = b.addTest(.{ .root_module = module });
const test_step = b.step("test", "Run all tests"); const test_step = b.step("test", "Run all tests");
test_step.dependOn(&b.addRunArtifact(tests).step); test_step.dependOn(&b.addRunArtifact(tests).step);
@ -37,11 +37,11 @@ pub fn build(b: *std.Build) void {
// Coverage: `zig build coverage` (kcov, Linux x86_64/aarch64 only) // Coverage: `zig build coverage` (kcov, Linux x86_64/aarch64 only)
{ {
var cov = Coverage.init(b); var cov = Coverage.init(b);
const cov_mod = b.createModule(.{ const coverage_module = b.createModule(.{
.root_source_file = b.path("src/root.zig"), .root_source_file = b.path("src/root.zig"),
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
}); });
_ = cov.addModule(cov_mod, "biff8"); _ = cov.addModule(coverage_module, "biff8");
} }
} }

View file

@ -7,6 +7,7 @@
.paths = .{ .paths = .{
"build.zig", "build.zig",
"build.zig.zon", "build.zig.zon",
"build",
"src", "src",
"LICENSE", "LICENSE",
"README.md", "README.md",