mirror of
https://github.com/allyourcodebase/protobuf.git
synced 2026-11-17 01:20:50 +00:00
protobuf and protoc ported to the zig build system
- Zig 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| LICENSE.upstream | ||
| README.md | ||
protobuf
protobuf but packaged for Zig.
How to add to your project
zig fetch --save git+https://github.com/allyourcodebase/protobuf
You can then access the available libraries and executables like this:
const protobuf_dep = b.dependency("protobuf", .{
.target = target,
.optimize = optimize,
});
// libµpb
const libupb = protobuf_dep.artifact("libupb");
// libprotobuf
const libprotobuf = protobuf_dep.artifact("libprotobuf");
// libprotoc
const libprotoc = protobuf_dep.artifact("libprotoc");
// protoc
const protoc = protobuf_dep.artifact("protoc");