https://github.com/ikskuh/zig-bearssl
A BearSSL binding for Zig
https://github.com/ikskuh/zig-bearssl
bearssl ssl tls zig zig-package ziglang
Last synced: 10 months ago
JSON representation
A BearSSL binding for Zig
- Host: GitHub
- URL: https://github.com/ikskuh/zig-bearssl
- Owner: ikskuh
- License: mit
- Created: 2020-05-21T00:42:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-21T12:32:27.000Z (almost 2 years ago)
- Last Synced: 2024-12-09T08:53:06.809Z (over 1 year ago)
- Topics: bearssl, ssl, tls, zig, zig-package, ziglang
- Language: C
- Size: 1.01 MB
- Stars: 31
- Watchers: 4
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zig-bearssl
A [BearSSL](https://bearssl.org/) binding for Zig, providing primitive (and probably unsafe, i'm no SSL expert) bindings for SSL and TLS connections to generic zig code.
## Adding to your project
You can pull this into your project with:
```sh
zig fetch --save git+https://github.com/ikskuh/zig-bearssl
```
Then in your `build.zig` you can add the module.
```zig
// Assuming you have `target` and `optimize` defined already
const bearssl = b.dependency(
"zig_bearssl",
.{ .target = target, .optimize = optimize },
);
// Assuming you have an `exe_mod` representing your module
exe_mod.addImport("bearssl", bearssl.module("bearssl"));
```
Then from inside your zig code you can do:
```zig
const bearssl = @import("bearssl")
```