|
|
@ -160,6 +160,48 @@ pub fn build(b: *std.build.Builder) void {
|
|
|
|
const run_step_array_stack = b.step("run_array_stack", "Run array_stack");
|
|
|
|
const run_step_array_stack = b.step("run_array_stack", "Run array_stack");
|
|
|
|
run_step_array_stack.dependOn(&run_cmd_array_stack.step);
|
|
|
|
run_step_array_stack.dependOn(&run_cmd_array_stack.step);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Section: "Hash Map"
|
|
|
|
|
|
|
|
// Source File: "chapter_hashing/hash_map.zig"
|
|
|
|
|
|
|
|
// Run Command: zig build run_hash_map
|
|
|
|
|
|
|
|
const exe_hash_map = b.addExecutable("hash_map", "chapter_hashing/hash_map.zig");
|
|
|
|
|
|
|
|
exe_hash_map.addPackagePath("include", "include/include.zig");
|
|
|
|
|
|
|
|
exe_hash_map.setTarget(target);
|
|
|
|
|
|
|
|
exe_hash_map.setBuildMode(mode);
|
|
|
|
|
|
|
|
exe_hash_map.install();
|
|
|
|
|
|
|
|
const run_cmd_hash_map = exe_hash_map.run();
|
|
|
|
|
|
|
|
run_cmd_hash_map.step.dependOn(b.getInstallStep());
|
|
|
|
|
|
|
|
if (b.args) |args| run_cmd_hash_map.addArgs(args);
|
|
|
|
|
|
|
|
const run_step_hash_map= b.step("run_hash_map", "Run hash_map");
|
|
|
|
|
|
|
|
run_step_hash_map.dependOn(&run_cmd_hash_map.step);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Section: "Binary Tree"
|
|
|
|
|
|
|
|
// Source File: "chapter_tree/binary_tree.zig"
|
|
|
|
|
|
|
|
// Run Command: zig build run_binary_tree
|
|
|
|
|
|
|
|
const exe_binary_tree = b.addExecutable("hash_map", "chapter_tree/binary_tree.zig");
|
|
|
|
|
|
|
|
exe_binary_tree.addPackagePath("include", "include/include.zig");
|
|
|
|
|
|
|
|
exe_binary_tree.setTarget(target);
|
|
|
|
|
|
|
|
exe_binary_tree.setBuildMode(mode);
|
|
|
|
|
|
|
|
exe_binary_tree.install();
|
|
|
|
|
|
|
|
const run_cmd_binary_tree = exe_binary_tree.run();
|
|
|
|
|
|
|
|
run_cmd_binary_tree.step.dependOn(b.getInstallStep());
|
|
|
|
|
|
|
|
if (b.args) |args| run_cmd_binary_tree.addArgs(args);
|
|
|
|
|
|
|
|
const run_step_binary_tree= b.step("run_binary_tree", "Run binary_tree");
|
|
|
|
|
|
|
|
run_step_binary_tree.dependOn(&run_cmd_binary_tree.step);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Section: "Linear Search"
|
|
|
|
|
|
|
|
// Source File: "chapter_searching/linear_search.zig"
|
|
|
|
|
|
|
|
// Run Command: zig build run_linear_search
|
|
|
|
|
|
|
|
const exe_linear_search = b.addExecutable("linear_search", "chapter_searching/linear_search.zig");
|
|
|
|
|
|
|
|
exe_linear_search.addPackagePath("include", "include/include.zig");
|
|
|
|
|
|
|
|
exe_linear_search.setTarget(target);
|
|
|
|
|
|
|
|
exe_linear_search.setBuildMode(mode);
|
|
|
|
|
|
|
|
exe_linear_search.install();
|
|
|
|
|
|
|
|
const run_cmd_linear_search = exe_linear_search.run();
|
|
|
|
|
|
|
|
run_cmd_linear_search.step.dependOn(b.getInstallStep());
|
|
|
|
|
|
|
|
if (b.args) |args| run_cmd_linear_search.addArgs(args);
|
|
|
|
|
|
|
|
const run_step_linear_search= b.step("run_linear_search", "Run linear_search");
|
|
|
|
|
|
|
|
run_step_linear_search.dependOn(&run_cmd_linear_search.step);
|
|
|
|
|
|
|
|
|
|
|
|
// Section: "Bubble Sort"
|
|
|
|
// Section: "Bubble Sort"
|
|
|
|
// Source File: "chapter_sorting/bubble_sort.zig"
|
|
|
|
// Source File: "chapter_sorting/bubble_sort.zig"
|
|
|
|
// Run Command: zig build run_bubble_sort
|
|
|
|
// Run Command: zig build run_bubble_sort
|
|
|
|