treesummaryrefslogcommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorpatrick-scho2025-03-05 19:57:20 +0100
committerpatrick-scho2025-03-05 19:57:20 +0100
commitabb5a6c230ae69c59fd7c9a36ca817a6b3711ed2 (patch)
tree190d837635308973a81703c9e2487a6713c87f12 /build.zig
downloadzighttp-abb5a6c230ae69c59fd7c9a36ca817a6b3711ed2.tar.gz
zighttp-abb5a6c230ae69c59fd7c9a36ca817a6b3711ed2.zip
Initial commit
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig29
1 files changed, 29 insertions, 0 deletions
diff --git a/build.zig b/build.zig
new file mode 100644
index 0000000..ce15aa9
--- /dev/null
+++ b/build.zig
@@ -0,0 +1,29 @@
+const std = @import("std");
+
+pub fn build(b: *std.Build) void {
+ const target = b.standardTargetOptions(.{});
+
+ const optimize = b.standardOptimizeOption(.{});
+
+ const mod = b.addModule("http", .{
+ .root_source_file = .{ .src_path = .{ .owner = b, .sub_path = "src/http.zig" } },
+ .target = target,
+ .optimize = optimize,
+ });
+ _ = mod;
+
+ const unit_tests = b.addTest(.{
+ .root_source_file = .{ .cwd_relative = "src/lmdb.zig" },
+ .target = target,
+ .optimize = optimize,
+ });
+
+ // const test_bin = b.addInstallBinFile(unit_tests.getEmittedBin(), "./lmdb_test");
+
+ const run_unit_tests = b.addRunArtifact(unit_tests);
+
+ const test_step = b.step("test", "Run unit tests");
+ test_step.dependOn(&run_unit_tests.step);
+ test_step.dependOn(&unit_tests.step);
+ // test_step.dependOn(&test_bin.step);
+}