|
@@ -40,16 +40,13 @@ pub fn build(b: *std.Build) !void {
|
|
|
|
|
|
const zap_module = b.dependency("zap", dep_opts).module("zap");
|
|
const zap_module = b.dependency("zap", dep_opts).module("zap");
|
|
const pg_module = b.dependency("pg", dep_opts).module("pg");
|
|
const pg_module = b.dependency("pg", dep_opts).module("pg");
|
|
- const dig_module = b.dependency("dig", dep_opts).module("dns");
|
|
|
|
|
|
|
|
try modules.put("zap", zap_module);
|
|
try modules.put("zap", zap_module);
|
|
try modules.put("pg", pg_module);
|
|
try modules.put("pg", pg_module);
|
|
- try modules.put("dig", dig_module);
|
|
|
|
|
|
|
|
// // Expose this as a module that others can import
|
|
// // Expose this as a module that others can import
|
|
exe.root_module.addImport("zap", zap_module);
|
|
exe.root_module.addImport("zap", zap_module);
|
|
exe.root_module.addImport("pg", pg_module);
|
|
exe.root_module.addImport("pg", pg_module);
|
|
- exe.root_module.addImport("dig", dig_module);
|
|
|
|
|
|
|
|
exe.linkLibrary(zap.artifact("facil.io"));
|
|
exe.linkLibrary(zap.artifact("facil.io"));
|
|
|
|
|
|
@@ -80,20 +77,4 @@ pub fn build(b: *std.Build) !void {
|
|
// This will evaluate the `run` step rather than the default, which is "install".
|
|
// This will evaluate the `run` step rather than the default, which is "install".
|
|
const run_step = b.step("run", "Run the app");
|
|
const run_step = b.step("run", "Run the app");
|
|
run_step.dependOn(&run_cmd.step);
|
|
run_step.dependOn(&run_cmd.step);
|
|
-
|
|
|
|
- // Creates a step for unit testing. This only builds the test executable
|
|
|
|
- // but does not run it.
|
|
|
|
- const unit_tests = b.addTest(.{
|
|
|
|
- .root_source_file = b.path("src/main.zig"),
|
|
|
|
- .target = target,
|
|
|
|
- .optimize = optimize,
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- const run_unit_tests = b.addRunArtifact(unit_tests);
|
|
|
|
-
|
|
|
|
- // Similar to creating the run step earlier, this exposes a `test` step to
|
|
|
|
- // the `zig build --help` menu, providing a way for the user to request
|
|
|
|
- // running the unit tests.
|
|
|
|
- const test_step = b.step("test", "Run unit tests");
|
|
|
|
- test_step.dependOn(&run_unit_tests.step);
|
|
|
|
}
|
|
}
|