This release targets zig 0.12 and is not compatible with other versions.
Installation
build.zig.zon
.{
.dependencies = .{
// other dependencies...
.tls12 = .{
.url = "https://github.com/melonedo/zig-tls12/archive/refs/tags/0.1.0-for-zig-0.12.tar.gz",
.hash = "1220bb536438e7f0f6b5bdb86039b7de33116ea52198eff0f1ac9f39ab10e487fbf6",
},
},
}
build.zig
// const exe = b.addExecutable(...);
const tls12 = b.dependency("tls12", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("tls12", tls12.module("zig-tls12"));
main.zig
// Drop-in replacement of std.http.Client
const HttpClient = @import("tls12");
Check readme for detailed instructions.