24 lines
519 B
Markdown
24 lines
519 B
Markdown
|
# LibreSSL
|
||
|
|
||
|
This is the [NATS C client library](https://github.com/nats-io/nats.c), packaged for [Zig](https://ziglang.org/).
|
||
|
|
||
|
## Installation
|
||
|
|
||
|
First, update your `build.zig.zon`:
|
||
|
|
||
|
```
|
||
|
# Initialize a `zig build` project if you haven't already
|
||
|
zig init
|
||
|
zig fetch --save <PLACEHOLDER>
|
||
|
```
|
||
|
|
||
|
You can then import `nats_c` in your `build.zig` with:
|
||
|
|
||
|
```zig
|
||
|
const nats_c_dependency = b.dependency("nats_c", .{
|
||
|
.target = target,
|
||
|
.optimize = optimize,
|
||
|
});
|
||
|
your_exe.linkLibrary(nats_c_dependency.artifact("nats_c"));
|
||
|
```
|