weekend changes

- move main.zig to it's own package, create lib/
- rename AllSections to DB, remove intermediate tuples
- iovec does not allocate
- remove error{Overflow} from almost everywhere
This commit is contained in:
2022-03-22 08:57:57 +02:00
committed by Motiejus Jakštys
parent 886382d900
commit a8b45911aa
14 changed files with 131 additions and 146 deletions

View File

@@ -50,24 +50,19 @@ pub fn build(b: *zbs.Builder) void {
cmph.addIncludeDir("deps/cmph/src");
cmph.addIncludeDir("include/deps/cmph");
const exe = b.addExecutable("init-exe", "src/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
addCmphDeps(exe, cmph);
exe.install();
{
const turbonss_test = b.addTest("src/test_main.zig");
addCmphDeps(turbonss_test, cmph);
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&turbonss_test.step);
const exe = b.addExecutable("turbo-unix2db", "cli/unix2db/main.zig");
exe.setTarget(target);
exe.setBuildMode(mode);
addCmphDeps(exe, cmph);
exe.install();
}
{
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
const turbonss_test = b.addTest("lib/test_all.zig");
addCmphDeps(turbonss_test, cmph);
const test_step = b.step("test", "Run the tests");
test_step.dependOn(&turbonss_test.step);
}
}