1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 23:24:09 +00:00

readd -Dopenssl to zap build.

modify readme for instructions how to use it
This commit is contained in:
Vemahk 2024-01-05 20:04:38 -06:00
parent 7ca46c4f10
commit 235e9045fc
2 changed files with 2 additions and 1 deletions

View file

@ -273,6 +273,7 @@ Then, in your `build.zig`'s `build` function, add the following before
const zap = b.dependency("zap", .{ const zap = b.dependency("zap", .{
.target = target, .target = target,
.optimize = optimize, .optimize = optimize,
//.openssl = true, // required to use tls
}); });
exe.addModule("zap", zap.module("zap")); exe.addModule("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io")); exe.linkLibrary(zap.artifact("facil.io"));

View file

@ -8,7 +8,7 @@ pub fn build(b: *std.build.Builder) !void {
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
// Use an os env var to determine whether to build openssl support // 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.os.getenv("ZAP_USE_OPENSSL")) |val| {
if (std.mem.eql(u8, val, "true")) break :blk true; if (std.mem.eql(u8, val, "true")) break :blk true;
} }