const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); // Create a module for the library _ = b.addModule("pi-finder", .{ .root_source_file = b.path("src/lib.zig"), .target = target, .optimize = optimize, }); // Library const lib = b.addStaticLibrary(.{ .name = "pi-finder", .root_source_file = b.path("src/lib.zig"), .target = target, .optimize = optimize, }); b.installArtifact(lib); // Tests const lib_unit_tests = b.addTest(.{ .root_source_file = b.path("src/lib.zig"), .target = target, .optimize = optimize, }); const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); const test_step = b.step("test", "Run unit tests"); test_step.dependOn(&run_lib_unit_tests.step); }