build.zig (768B)
1 const std = @import("std"); 2 3 pub fn build(b: *std.Build) void { 4 const target = b.standardTargetOptions(.{}); 5 const optimize = b.standardOptimizeOption(.{}); 6 7 const lib = b.addStaticLibrary(.{ 8 .name = "smtp", 9 .root_source_file = b.path("src/main.zig"), 10 .target = target, 11 .optimize = optimize, 12 }); 13 b.installArtifact(lib); 14 _ = b.addModule("smtp", .{ .root_source_file = b.path("src/main.zig") }); 15 16 const main_tests = b.addTest(.{ 17 .root_source_file = b.path("src/main.zig"), 18 .target = target, 19 .optimize = optimize, 20 }); 21 const run_main_tests = b.addRunArtifact(main_tests); 22 23 const test_step = b.step("test", "Run library tests"); 24 test_step.dependOn(&run_main_tests.step); 25 }