const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const mod = b.addModule("embedz", .{ .root_source_file = b.path("src/embedz.zig"), .target = target, .optimize = optimize, }); const tests = b.addTest(.{ .root_module = mod }); const test_step = b.step("test", "run unit tests"); test_step.dependOn(&b.addRunArtifact(tests).step); const xval = b.addExecutable(.{ .name = "embedz-xval", .root_module = b.createModule(.{ .root_source_file = b.path("examples/xval.zig"), .target = target, .optimize = optimize, .link_libc = true, .imports = &.{.{ .name = "embedz", .module = mod }}, }), }); b.installArtifact(xval); const bench = b.addExecutable(.{ .name = "embedz-bench", .root_module = b.createModule(.{ .root_source_file = b.path("examples/bench.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "embedz", .module = mod }}, }), }); b.installArtifact(bench); }