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; }