https://github.com/notfilippo/nanopb-zig
The nanopb runtime library ported to the zig build system
https://github.com/notfilippo/nanopb-zig
nanopb protobuf protocol-buffers zig
Last synced: 8 months ago
JSON representation
The nanopb runtime library ported to the zig build system
- Host: GitHub
- URL: https://github.com/notfilippo/nanopb-zig
- Owner: notfilippo
- Created: 2025-03-11T21:00:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-11T22:28:44.000Z (over 1 year ago)
- Last Synced: 2025-03-11T23:27:43.879Z (over 1 year ago)
- Topics: nanopb, protobuf, protocol-buffers, zig
- Language: Zig
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `nanopb` Runtime
This is the [nanopb runtime](https://github.com/nanopb/nanopb), packaged for [Zig](https://ziglang.org/).
## Status
This project only builds the `nanopb` runtime library. It does not build the `nanopb`
code [generator](https://github.com/nanopb/nanopb/tree/master/generator).
Linux, macOS and Windows are tested by CI.
## Usage
First, update your `build.zig.zon`:
```sh
# Initialize a `zig build` project if you haven't already
zig init
# replace with the version you want to use, e.g. 0.4.9.1+0.14.0
zig fetch --save git+https://github.com/notfilippo/nanopb#
```
You can then use `nanopb` in your `build.zig` with:
```zig
const nanopb_dep = b.dependency("nanopb", .{
.target = target,
.optimize = optimize,
});
your_exe.linkLibrary(nanopb_dep.artifact("nanopb"));
```