LukasKastern / zig-mbedtls

compile mbedtls in your build.zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mbedtls build package

ci

Like this project?

If you like this project or other works of mine, please consider donating to or sponsoring me on Github ❤️

How to use

This repo contains code for your build.zig that can statically compile mbedtls.

Link to your application

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

About

compile mbedtls in your build.zig

License:MIT License


Languages

Language:C 84.5%Language:Shell 8.6%Language:Python 4.1%Language:Makefile 1.3%Language:Perl 0.9%Language:CMake 0.5%Language:Zig 0.1%Language:Dockerfile 0.1%Language:C++ 0.0%Language:GDB 0.0%Language:Batchfile 0.0%Language:SmPL 0.0%Language:Tcl 0.0%