24 lines
566 B
Markdown
24 lines
566 B
Markdown
|
# LibreSSL
|
||
|
|
||
|
This is the [protobuf-c runtime](https://github.com/protobuf-c/protobuf-c/tree/master/protobuf-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 `protobuf_c` in your `build.zig` with:
|
||
|
|
||
|
```zig
|
||
|
const protobuf_c_dependency = b.dependency("protobuf_c", .{
|
||
|
.target = target,
|
||
|
.optimize = optimize,
|
||
|
});
|
||
|
your_exe.linkLibrary(protobuf_c_dependency.artifact("protobuf_c"));
|
||
|
```
|