From 7f43050436fad85076e252a428bff7b9be6955b1 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Wed, 15 Sep 2021 08:57:21 -0700 Subject: [PATCH] add gyro stuff --- .gitignore | 3 +++ build.zig | 4 +++- deps.zig | 22 ++++++++++++++++++++++ gyro.lock | 1 + gyro.zzz | 2 ++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 deps.zig create mode 100644 gyro.lock create mode 100644 gyro.zzz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..079b0d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.gyro/ +zig-cache/ +zig-out/ diff --git a/build.zig b/build.zig index f72c60b..224585a 100644 --- a/build.zig +++ b/build.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const pkgs = @import("deps.zig").pkgs; pub fn build(b: *std.build.Builder) void { // Standard target options allows the person running `zig build` to choose @@ -11,7 +12,8 @@ pub fn build(b: *std.build.Builder) void { // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. const mode = b.standardReleaseOptions(); - const exe = b.addExecutable("lambda-zig", "src/main.zig"); + const exe = b.addExecutable("bootstrap", "src/main.zig"); + pkgs.addAllTo(exe); exe.setTarget(target); exe.setBuildMode(mode); exe.install(); diff --git a/deps.zig b/deps.zig new file mode 100644 index 0000000..2968a6b --- /dev/null +++ b/deps.zig @@ -0,0 +1,22 @@ +const std = @import("std"); +pub const pkgs = struct { + pub const http = std.build.Pkg{ + .name = "http", + .path = .{ .path = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg/src/main.zig" }, + }; + + pub fn addAllTo(artifact: *std.build.LibExeObjStep) void { + @setEvalBranchQuota(1_000_000); + inline for (std.meta.declarations(pkgs)) |decl| { + if (decl.is_pub and decl.data == .Var) { + artifact.addPackage(@field(pkgs, decl.name)); + } + } + } +}; + +pub const exports = struct { +}; +pub const base_dirs = struct { + pub const http = ".gyro/http-ducdetronquito-0.1.3-02dd386aa7452ba02887b98078627854/pkg"; +}; diff --git a/gyro.lock b/gyro.lock new file mode 100644 index 0000000..b87d6a4 --- /dev/null +++ b/gyro.lock @@ -0,0 +1 @@ +pkg default ducdetronquito http 0.1.3 diff --git a/gyro.zzz b/gyro.zzz new file mode 100644 index 0000000..65e0bf6 --- /dev/null +++ b/gyro.zzz @@ -0,0 +1,2 @@ +deps: + ducdetronquito/http: ^0.1.3