const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const pkg = b.dependency("eostre", .{ .target = target, .optimize = optimize, }); const exe = b.addExecutable(.{ .name = "shell", .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize }); const run_exe = b.addRunArtifact(exe); const run_step = b.step("run", "Run the application"); run_step.dependOn(&run_exe.step); exe.root_module.addImport("eostre", pkg.module("eostre")); const test_step = b.step("test", "Run unit tests"); const tests = b.addTest(.{ .name = "shell", .root_source_file = b.path("src/main.zig"), .target = target, }); tests.root_module.addImport("eostre", pkg.module("eostre")); const run_tests = b.addRunArtifact(tests); test_step.dependOn(&run_tests.step); const lib_tests = b.addRunArtifact(pkg.artifact("eostre")); test_step.dependOn(&lib_tests.step); }