aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-20 02:34:42 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-05-20 02:34:42 -0700
commit8b75f56577abc3ad2479b87fc59b7243add6a29a (patch)
tree5501729e5f81a6aa65ed986148956882e207d656 /build.zig
parent9541d268ded6ed38d739e62cb8b4cf597cf69193 (diff)
downloadbun-8b75f56577abc3ad2479b87fc59b7243add6a29a.tar.gz
bun-8b75f56577abc3ad2479b87fc59b7243add6a29a.tar.zst
bun-8b75f56577abc3ad2479b87fc59b7243add6a29a.zip
pico
Former-commit-id: cee857ac4e25638e5f93d838d54124ffaca938b7
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 042642932..76e7451f5 100644
--- a/build.zig
+++ b/build.zig
@@ -1,5 +1,15 @@
const std = @import("std");
+pub fn addPicoHTTP(step: *std.build.LibExeObjStep, comptime dir: []const u8) void {
+ step.addCSourceFile(dir ++ "/picohttpparser/picohttpparser.c", &[_][]const u8{});
+ step.addIncludeDir(dir ++ "/picohttpparser");
+
+ step.addPackage(.{
+ .name = "picohttp",
+ .path = dir ++ "/picohttp.zig",
+ });
+}
+
pub fn build(b: *std.build.Builder) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
@@ -97,6 +107,7 @@ pub fn build(b: *std.build.Builder) void {
if (!target.getCpuArch().isWasm()) {
exe.addLibPath("/usr/local/lib");
+ addPicoHTTP(exe, "src/deps");
}
exe.install();