nanopb
FreeNanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (2-10 kB ROM, <1 kB RAM) memory constraints.
About nanopb
Nanopb is a plain-C implementation of Google's Protocol Buffers data format, specifically designed for 32-bit microcontrollers and other embedded systems with tight memory constraints (approximately 10 kB ROM and 1 kB RAM). It provides a lightweight, efficient way to serialize and deserialize structured data in resource-limited environments. The library is distributed under the zlib license and has been used in products such as Android phones, iPhones, TomTom Sports devices, Cisco TelePresence Server, and Garmin GPS watches. Development is hosted on GitHub, with support available via the issue tracker and a Google Groups discussion forum. Commercial support is offered by devEmbedded.
Key Features
Pros & Cons
- Extremely low memory and ROM requirements suitable for microcontrollers
- Written in plain C, easy to integrate into embedded C projects
- Widely adopted in commercial products, demonstrating reliability
- Permissive zlib license allows use in proprietary projects
- Active community and commercial support available
- Limited to features supported by the lightweight implementation; may not cover all Protocol Buffers features
- Primarily targets 32-bit microcontrollers; less optimized for very small 8-bit or 16-bit MCUs
- Documentation is minimal and geared towards experienced embedded developers
- No built-in RPC support unlike gRPC