Skip to content

Commit

Permalink
Remove src/root and lib using root file
Browse files Browse the repository at this point in the history
  • Loading branch information
rlopzc committed Jul 15, 2024
1 parent bb2a42b commit 222873f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,11 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});

const lib = b.addStaticLibrary(.{
.name = "waybar-wise-fx-rate",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});

// This declares intent for the library to be installed into the standard
// location when the user invokes the "install" step (the default step when
// running `zig build`).
b.installArtifact(lib);

const exe = b.addExecutable(.{
.name = "waybar-wise-fx-rate",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.version = .{
.major = 0,
.minor = 1,
.patch = 0,
},
});

const clap = b.dependency("clap", .{});
Expand Down Expand Up @@ -72,16 +53,6 @@ pub fn build(b: *std.Build) void {
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);

// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const lib_unit_tests = b.addTest(.{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});

const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);

const exe_unit_tests = b.addTest(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
Expand All @@ -94,6 +65,5 @@ pub fn build(b: *std.Build) void {
// 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_lib_unit_tests.step);
test_step.dependOn(&run_exe_unit_tests.step);
}
Empty file removed src/root.zig
Empty file.

0 comments on commit 222873f

Please sign in to comment.