protobuf-c/readme.md

24 lines
566 B
Markdown
Raw Normal View History

2024-09-14 20:10:10 -07:00
# 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"));
```