1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00
zap/wrk/http.zig/build.zig
2023-08-24 11:49:58 +02:00

24 lines
703 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const hzzp_dep = b.dependency("httpz", .{ .target = target, .optimize = optimize });
// setup executable
const exe = b.addExecutable(.{
.name = "http.zig.demo",
.root_source_file = .{ .path = "main.zig" },
.target = target,
.optimize = optimize,
});
exe.addModule("httpz", hzzp_dep.module("httpz"));
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
}