baseline: mongo-light working tree before concurrency refactor
This commit is contained in:
46
build.zig
Normal file
46
build.zig
Normal file
@@ -0,0 +1,46 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const lib_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/lib.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const exe_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.imports = &.{
|
||||
.{ .name = "mongo", .module = lib_mod },
|
||||
},
|
||||
});
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "mongo-light",
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
run_cmd.step.dependOn(b.getInstallStep());
|
||||
if (b.args) |args| run_cmd.addArgs(args);
|
||||
const run_step = b.step("run", "Run mongo-light server");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const test_mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/lib.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const test_step = b.addTest(.{
|
||||
.root_module = test_mod,
|
||||
});
|
||||
const run_tests = b.addRunArtifact(test_step);
|
||||
const test_help = b.step("test", "Run unit tests");
|
||||
test_help.dependOn(&run_tests.step);
|
||||
}
|
||||
Reference in New Issue
Block a user