macOS
brew install nanopblocal Homebrew formula metadata
安装
brew install nanopblocal Homebrew formula metadata
sudo apt install nanopbDebian stable package indexes · nanopb · 来源: deb.debian.org
sudo dnf install nanopbFedora Rawhide package metadata · nanopb · 来源: dl.fedoraproject.org
nix profile install nixpkgs#nanopbnixpkgs package indexes · pkgs/by-name/na/nanopb/package.nix · 来源: api.github.com
sudo zypper install libprotobuf-nanopb0openSUSE Tumbleweed package metadata · libprotobuf-nanopb0 · 来源: download.opensuse.org
概览
C library for encoding and decoding Protocol Buffer messages
历史
nanopb is a small-code-size Protocol Buffers implementation in ANSI C, aimed at microcontrollers and other memory-constrained systems. Its official site describes targets with tight memory budgets under 10 kB ROM and under 1 kB RAM.
The upstream license text credits Petteri Aimonen and dates the project to 2011. The GitHub repository used for development was created on 2015-04-29, and the official site points development and bug reporting to GitHub while keeping the documentation and release downloads on jpa.kapsi.fi.
The core design is deliberately embedded-first: pure C runtime, generated `.pb.c` and `.pb.h` files from `.proto` definitions, static sizing through `.options` files, no required malloc, split encoder/decoder files so projects can compile only the pieces they need, and callback streams for messages larger than available RAM.
GitHub API data fetched on 2026-07-01 showed 5,454 stars and 1,027 forks, strong adoption for a niche embedded serialization library. The repository also includes Zephyr-related integration files, examples, tests, Bazel/CMake/Meson/Swift package metadata, and generator tooling, reflecting use across several embedded build systems.
Homebrew's formula JSON generated on 2026-07-01 reported stable version 0.4.9.1, an old formula name of `nanopb-generator`, 1,082 installs over 365 days, and 740 installs-on-request over 365 days. That pattern fits a toolchain component: many installs are explicit because developers need the generator and protoc integration for firmware or cross-platform protocol work.
A typical user writes Protocol Buffer schemas in `.proto` files, runs `nanopb_generator.py` or `protoc-gen-nanopb` to produce C headers and sources, then compiles `pb_common.c`, `pb_encode.c`, and/or `pb_decode.c` into firmware. `.options` files set maximum field sizes so generated structs can stay static.
Package nerds use the Homebrew package mostly for the host-side generator, not because macOS is the target runtime. The generated C is then carried into firmware, RTOS, or embedded Linux builds where normal Google protobuf runtimes would be too large or too allocation-heavy.
nanopb is one of the standard answers when someone wants Protocol Buffers on a microcontroller without dragging in a large runtime. It keeps protobuf's schema compatibility story while making the code size, allocation behavior, and generated C output legible to embedded build systems.
安全态势
library-like package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
<proto basename>.options next to the .proto file可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
nanopb_generator | cli | 全局可执行文件 | |
nanopb_generator.py | cli | 全局可执行文件 | |
protoc-gen-nanopb | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://jpa.kapsi.fi/nanopb/docs/index.html
安装元数据
| 软件包键 | brew:nanopb |
|---|---|
| 版本 | 0.4.9.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/nanopb |
| 主页 | https://jpa.kapsi.fi/nanopb/docs/index.html |
| 仓库 | https://github.com/nanopb/nanopb |
| 上游文档 | https://github.com/nanopb/nanopb#readme |
| 许可证 | Zlib |
| 源码归档 | https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9.1.tar.gz |
| 依赖 | protobuf, python@3.14 |
| 构建依赖 | cmake |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | nanopb |
| Version Scheme | 0 |
| Revision | 6 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
libnanopb-dev 0.4.9.1-1
Protocol Buffers with small code size, development files
sudo apt install libnanopb-devnanopb 0.4.9.1-1
Protocol Buffers with small code size
sudo apt install nanopbnanopb
nix profile install nixpkgs#nanopblibnanopb-dev 0.4.8-1
Protocol Buffers with small code size, development files
sudo apt install libnanopb-devnanopb 0.4.8-1
Protocol Buffers with small code size
sudo apt install nanopbnanopb 0.4.9.1-3.fc45
A small code-size Protocol Buffers implementation in ansi C
sudo dnf install nanopbnanopb-devel 0.4.9.1-3.fc45
Development files for nanopb
sudo dnf install nanopb-develnanopb-python3 0.4.9.1-3.fc45
Small code-size Protocol Buffers implementation in Python
sudo dnf install nanopb-python3libprotobuf-nanopb0 0.4.9.1-1.6
Shared library for nanopb
sudo zypper install libprotobuf-nanopb0nanopb-devel 0.4.9.1-1.6
Development files for nanopb
sudo zypper install nanopb-develnanopb-source 0.4.9.1-1.6
Source code of nanopb
sudo zypper install nanopb-source来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.