Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 29 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 (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-09T23:38:01.000Z (7 months ago)
- Last Synced: 2024-10-05T15:16:28.145Z (about 1 month ago)
- Topics: build, mbedtls, tls, zig, zig-package
- Language: Zig
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mbedtls build package
[![ci](https://github.com/mattnite/zig-mbedtls/actions/workflows/ci.yml/badge.svg)](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);
}
```