Remove main.zig CLI executable

Library-only project - examples are in src/examples/
This commit is contained in:
2026-01-17 18:38:48 +05:30
parent 6ab3f14897
commit a65f01fdd0
2 changed files with 0 additions and 103 deletions

View File

@@ -8,37 +8,7 @@ pub fn build(b: *std.Build) void {
.target = target,
});
const exe = b.addExecutable(.{
.name = "pugz",
.root_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "pugz", .module = mod },
},
}),
});
b.installArtifact(exe);
const run_step = b.step("run", "Run the app");
const run_cmd = b.addRunArtifact(exe);
run_step.dependOn(&run_cmd.step);
// By making the run step depend on the default step, it will be run from the
// installation directory rather than directly from within the cache directory.
run_cmd.step.dependOn(b.getInstallStep());
// This allows the user to pass arguments to the application in the build
// command itself, like this: `zig build run -- arg1 arg2 etc`
if (b.args) |args| {
run_cmd.addArgs(args);
}
// Creates an executable that will run `test` blocks from the provided module.
// Here `mod` needs to define a target, which is why earlier we made sure to
// set the releative field.
const mod_tests = b.addTest(.{
.root_module = mod,
});
@@ -46,16 +16,6 @@ pub fn build(b: *std.Build) void {
// A run step that will run the test executable.
const run_mod_tests = b.addRunArtifact(mod_tests);
// Creates an executable that will run `test` blocks from the executable's
// root module. Note that test executables only test one module at a time,
// hence why we have to create two separate ones.
const exe_tests = b.addTest(.{
.root_module = exe.root_module,
});
// A run step that will run the second test executable.
const run_exe_tests = b.addRunArtifact(exe_tests);
// Integration tests - general template tests
const general_tests = b.addTest(.{
.root_module = b.createModule(.{
@@ -100,7 +60,6 @@ pub fn build(b: *std.Build) void {
// make the two of them run in parallel.
const test_step = b.step("test", "Run all tests");
test_step.dependOn(&run_mod_tests.step);
test_step.dependOn(&run_exe_tests.step);
test_step.dependOn(&run_general_tests.step);
test_step.dependOn(&run_doctype_tests.step);
test_step.dependOn(&run_inheritance_tests.step);