If you like this project or other works of mine, please consider donating to or sponsoring me on Github ❤️
This repo contains code for your build.zig
that can statically compile mbedtls.
In order to statically link mbedtls into your application:
const mbedtls = @import("path/to/mbedtls.zig");
pub fn build(b: *std.build.Builder) void {
// ...
const lib = mbedtls.create(b, target, optimize);
const exe = b.addExecutable(.{
.name = "my-program",
.root_source_file = .{ .path = "src/main.zig" },
.target = target,
.optimize = optimize,
});
lib.link(exe);
}