# nanopb/nanopb

Protocol Buffers with small code size

Repository: https://github.com/nanopb/nanopb
Canonical: https://ross.abutalabs.com/products/nanopb
Homepage: https://jpa.kapsi.fi/nanopb/
Language: C
License: Zlib
License Family: permissive
Topics: nanopb, protocol-buffers, c, embedded, embedded-c
Last push: 2026-08-26T18:42:20+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 67, longevity 100
- inputs: {"age_days": 4144, "days_push": 7, "days_rel": 8, "gap_med": 376, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5537, forks 1037 (observed 2026-08-28T04:09:22.077865+00:00)

## What it is
Nanopb is a small code-size Protocol Buffers implementation in plain ANSI C, designed for microcontrollers and other memory-constrained systems (<10 kB ROM, <1 kB RAM). It includes a Python-based code generator that compiles standard .proto files into static C structures with no malloc requirement.

## Use cases
- encode and decode protobuf messages on a microcontroller
- use protocol buffers in embedded C with no dynamic memory allocation
- communicate with a protobuf-based API from an IoT device
- generate C code from .proto files for firmware
- fit protobuf serialization into under 10 kB of ROM
- decode untrusted protobuf data safely on an embedded device

## When to choose
- you need Protocol Buffers in C on a memory-restricted embedded system or microcontroller
- you want static allocation with no malloc and predictable RAM usage
- you need a mature, widely deployed C protobuf runtime with a documented security model

## When to avoid
- you need full protobuf features like reflection, dynamic messages, or gRPC on a resource-rich platform
- your project is in a higher-level language with official protobuf libraries available
- you need proto3 features or very large field tags without extra compilation options

## Facets
- artifact type: library
- maturity: stable
- function: serialization, parser, sdk
- domain: embedded-systems, parsers, developer-tools, iot
- platform: c, cpp, embedded, cross-platform, windows
- tags: protocol-buffers, protobuf, microcontrollers, code-generation, no-malloc, small-footprint, ansi-c, linux, macos

## Member repositories
- nanopb/nanopb (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.077865+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:43.406535+00:00, confidence not recorded.
  - readme: https://github.com/nanopb/nanopb (fetched 2026-08-28T04:09:22.077865+00:00, sha 81f920acb19b)
  - homepage: https://jpa.kapsi.fi/nanopb/ (fetched 2026-08-29T08:51:08.852233+00:00, sha 6307eb547d90)
  - site_page: https://jpa.kapsi.fi/nanopb/docs/security.html (fetched 2026-08-29T08:51:08.863763+00:00, sha a01687e4df71)
  - site_page: https://jpa.kapsi.fi/nanopb/docs/index.html (fetched 2026-08-29T08:51:08.856860+00:00, sha b535a910638f)
  - site_page: https://jpa.kapsi.fi/nanopb/docs/concepts.html (fetched 2026-08-29T08:51:08.858661+00:00, sha 5d14d79fc307)
  - site_page: https://jpa.kapsi.fi/nanopb/docs/reference.html (fetched 2026-08-29T08:51:08.860880+00:00, sha 0376f991ccce)
  - site_page: https://jpa.kapsi.fi/nanopb/download (fetched 2026-08-29T08:51:08.854892+00:00, sha 78f1f48aeb70)
- Data as of 2026-08-30T08:39:29.467469+00:00.
