From 613afaf1af5e15c1ef43150ce4123fc86266e0f0 Mon Sep 17 00:00:00 2001 From: Vemahk Date: Fri, 5 Jan 2024 20:04:38 -0600 Subject: [PATCH] readd -Dopenssl to zap build. modify readme for instructions how to use it --- README.md | 1 + build.zig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 816c8ab..20f4b10 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,7 @@ Then, in your `build.zig`'s `build` function, add the following before const zap = b.dependency("zap", .{ .target = target, .optimize = optimize, + //.openssl = true, // required to use tls }); exe.addModule("zap", zap.module("zap")); exe.linkLibrary(zap.artifact("facil.io")); diff --git a/build.zig b/build.zig index 8090aa9..60f235b 100644 --- a/build.zig +++ b/build.zig @@ -8,7 +8,7 @@ pub fn build(b: *std.Build) !void { const optimize = b.standardOptimizeOption(.{}); // Use an os env var to determine whether to build openssl support - const use_openssl = blk: { + const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse blk: { if (std.os.getenv("ZAP_USE_OPENSSL")) |val| { if (std.mem.eql(u8, val, "true")) break :blk true; }