melonedo / zig-tls12

HTTP client capable of TLS 1.2.
MIT License
27 stars 5 forks source link

Expose zig-tls12 as a module #4

Closed Cloudef closed 9 months ago

Cloudef commented 9 months ago

Static lib does not make much sense as no C API is being exposed, we would have to import the .zig file defeating the whole purpose.

Closes #3

Cloudef commented 9 months ago

zig-tls12 can now be used with package manager like this:

build.zig.zon:

.tls12 = .{
   .url = "https://github.com/Cloudef/zig-tls12/archive/84bd5e3336f939e87f08a7b22fa05c312eed5932.tar.gz",
   .hash = "122073b50ab99ec3e67f0f22cc9284475059701dad68a9c136dea38c3ba990e1151d",
},

build.zig:

const tls12 = b.dependency("tls12", .{ .target = target, .optimize = optimize });
step.root_module.addImport("tls12", tls12.module("zig-tls12"));
melonedo commented 9 months ago

Thanks!