treesummaryrefslogcommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig41
1 files changed, 0 insertions, 41 deletions
diff --git a/build.zig b/build.zig
index d1acff1..bd06ef3 100644
--- a/build.zig
+++ b/build.zig
@@ -21,26 +21,6 @@ pub fn build(b: *std.Build) void {
// target and optimize options) will be listed when running `zig build --help`
// in this directory.
- // This creates a module, which represents a collection of source files alongside
- // some compilation options, such as optimization mode and linked system libraries.
- // Zig modules are the preferred way of making Zig code available to consumers.
- // addModule defines a module that we intend to make available for importing
- // to our consumers. We must give it a name because a Zig package can expose
- // multiple modules and consumers will need to be able to specify which
- // module they want to access.
- const mod = b.addModule("default", .{
- // The root source file is the "entry point" of this module. Users of
- // this module will only be able to access public declarations contained
- // in this file, which means that if you have declarations that you
- // intend to expose to consumers that were defined in other files part
- // of this module, you will have to make sure to re-export them from
- // the root file.
- .root_source_file = b.path("src/root.zig"),
- // Later on we'll use this module as the root module of a test executable
- // which requires us to specify a target.
- .target = target,
- });
-
// Here we define an executable. An executable needs to have a root module
// which needs to expose a `main` function. While we could add a main function
// to the module defined above, it's sometimes preferable to split business
@@ -70,16 +50,6 @@ pub fn build(b: *std.Build) void {
// definition if desireable (e.g. firmware for embedded devices).
.target = target,
.optimize = optimize,
- // List of modules available for import in source files part of the
- // root module.
- .imports = &.{
- // Here "default" is the name you will use in your source code to
- // import this module (e.g. `@import("default")`). The name is
- // repeated because you are allowed to rename your imports, which
- // can be extremely useful in case of collisions (which can happen
- // importing modules from different packages).
- .{ .name = "default", .module = mod },
- },
}),
});
@@ -115,16 +85,6 @@ pub fn build(b: *std.Build) void {
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,
- });
-
- // 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.
@@ -139,7 +99,6 @@ pub fn build(b: *std.Build) void {
// times and since the two run steps do not depend on one another, this will
// make the two of them run in parallel.
const test_step = b.step("test", "Run tests");
- test_step.dependOn(&run_mod_tests.step);
test_step.dependOn(&run_exe_tests.step);
// Just like flags, top level steps are also listed in the `--help` menu.