https://github.com/mattnite/zig-mbedtls
compile mbedtls in your build.zig
https://github.com/mattnite/zig-mbedtls
build mbedtls tls zig zig-package
Last synced: 12 days ago
JSON representation
compile mbedtls in your build.zig
- Host: GitHub
- URL: https://github.com/mattnite/zig-mbedtls
- Owner: mattnite
- License: mit
- Created: 2021-12-17T16:49:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-09T23:38:01.000Z (about 1 year ago)
- Last Synced: 2025-03-29T03:02:06.849Z (30 days ago)
- Topics: build, mbedtls, tls, zig, zig-package
- Language: Zig
- Homepage:
- Size: 19.5 KB
- Stars: 4
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mbedtls build package
[](https://github.com/mattnite/zig-mbedtls/actions/workflows/ci.yml)
## Like this project?
If you like this project or other works of mine, please consider [donating to or sponsoring me](https://github.com/sponsors/mattnite) on Github [:heart:](https://github.com/sponsors/mattnite)
## 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:
```zig
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);
}
```