awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
nanopb avatar

nanopb/nanopb

0
View on GitHub↗
5,437 stars·1,024 forks·C·Zlib·25 viewsjpa.kapsi.fi/nanopb↗

Nanopb

Nanopb is a lightweight C implementation of Protocol Buffers designed for resource-constrained systems and microcontrollers. It functions as both an embedded serialization library for encoding and decoding structured data and a code generator that transforms definition files into compact C source and header files.

The project is distinguished by its focus on static memory allocation, using fixed maximum sizes for strings and arrays to avoid dynamic memory allocation and heap fragmentation. It employs a callback-based streaming mechanism to process messages or fields that exceed available physical RAM, allowing for the handling of variable-length data without exhausting system memory.

The library provides broad capabilities for binary serialization, including encoded size calculation, submessage presence tracking, and transport-level framing. It also includes reflection utilities for field iteration, UTF-8 string validation, and strict bounds enforcement to ensure memory safety when parsing untrusted binary input.

Features

  • Embedded Serialization Utilities - Provides a serialization library optimized for memory-constrained microcontrollers without dynamic memory allocation.
  • Static Memory Allocations - Uses fixed maximum sizes for strings and arrays to ensure static memory allocation on resource-constrained systems.
  • Protocol Buffer Implementations - Provides a full implementation of Protocol Buffers specifically optimized for microcontrollers and memory-restricted systems.
  • Data Encoding and Serialization - Implements binary serialization for converting structured data into portable formats for storage or transmission.
  • Incremental Data Streaming - Processes data structures that exceed available system memory via incremental, function-based callbacks.
  • Large Dataset Streaming - Handles data structures that exceed available system RAM through incremental streaming and callback mechanisms.
  • Streaming Parsers - Provides incremental data processing using event-driven callbacks to handle messages that exceed available RAM.
  • Schema-Driven Code Generators - Translates schema definition files into type-safe C source and header files.
  • Binary Data Encoding - Serializes data structures into a compact binary format to minimize overhead on embedded systems.
  • Callback-Based Data Streaming - Handles binary data streams larger than physical RAM by employing a callback-based streaming mechanism.
  • Serialization Callbacks - Implements a callback mechanism to process fields of unlimited size without exhausting system memory.
  • Message Encoders and Decoders - Decodes complex binary streams containing nested elements, optional fields, and packed arrays.
  • Binary Format Decoders - Parses binary data streams into structured C data objects based on protobuf specifications.
  • Low-Memory Serialization - Encodes and decodes structured data into binary formats without using dynamic memory allocation to prevent heap fragmentation.
  • C Source Generators - Converts definition files into C source and header files for native compilation on microcontrollers.
  • Native Header Generators - Generates C header files to enable typed message handling in resource-constrained embedded projects.
  • C Code Generators - Translates Protocol Buffer definition files into compact C source and header files for embedded firmware.
  • Static Allocation Strategies - Implements strategies to pre-calculate memory requirements at compile time to avoid heap usage on embedded hardware.
  • Input Bounds Enforcement - Enforces strict bounds on reads and writes to ensure memory safety when parsing untrusted binary input.
  • Callback-Based Serialization - Uses callback functions to process large or dynamic data fields during encoding and decoding without buffering.
  • Stream Abstractions - Decouples serialization logic from hardware transports using a lightweight stream-abstracted reader and writer interface.
  • Binary Size Calculation - Calculates the total byte count required to serialize a message before performing the encoding.
  • Variable Data Callbacks - Executes user-defined functions during encoding and decoding to handle fields of unlimited or variable size.
  • Length-Delimited Message Framing - Prefixes message data with length indicators to facilitate parsing of variable-length segments over serial streams.
  • Submessage Presence Flags - Maintains explicit flags for nested messages to distinguish between empty data and missing fields.
  • Networking & Communication - Facilitates structured message exchange over serial or network streams between resource-constrained devices and other systems.
  • Field Processing - Invokes callback functions during processing to handle arrays or strings of unlimited length without exhausting RAM.
  • Binary Field Layout Optimizations - Controls the memory footprint of arrays and enums by specifying integer sizes and bit-widths during generation.
  • Generation Options - Allows specification of field types, packing options, and maximum sizes to control how definitions are converted into code.
  • Field Limit Configurations - Defines maximum field sizes via configuration files to allocate memory statically for restricted environments.
  • Safe Binary Parsing - Enforces strict bounds on reads and writes to ensure memory safety when decoding potentially malicious binary input.
  • Transport Abstractions - Decouples encoding and decoding logic from specific hardware transports through lightweight interface structures.
  • Message Descriptor Reflection - Provides reflection utilities for iterating over message fields using metadata descriptors.
  • Message Field Iterators - Enables traversal of message fields using descriptors to inspect or process metadata and values generically.
  • Communication Protocols - Small-footprint Protocol Buffers implementation in ANSI C.
  • Serialization - Small-footprint Protocol Buffers implementation for C.
  • Developer Tools and Utilities - Protocol Buffers implementation for embedded systems.

Star history

Star history chart for nanopb/nanopbStar history chart for nanopb/nanopb

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Nanopb

Similar open-source projects, ranked by how many features they share with Nanopb.
  • serde-rs/serdeserde-rs avatar

    serde-rs/serde

    10,457View on GitHub↗

    This project is a framework for the efficient serialization and deserialization of data structures. It provides a unified, macro-based interface that automates the conversion of complex internal objects into standardized formats and reconstructs them from raw input streams or buffers. By leveraging compile-time code generation, the library minimizes manual implementation overhead while ensuring consistent logic across diverse data types. The framework distinguishes itself through a format-agnostic data model and a visitor-based parsing architecture that decouples data structures from specific

    Rustderiveno-stdrust
    View on GitHub↗10,457
  • bblanchon/arduinojsonbblanchon avatar

    bblanchon/ArduinoJson

    7,176View on GitHub↗

    ArduinoJson is a C++ library for parsing and manipulating JSON data and MessagePack binary streams on microcontrollers with limited memory and processing power. It provides the core primitives necessary for embedded data serialization and parsing, enabling devices to exchange structured data over serial or network interfaces. The library is distinguished by its focus on microcontroller memory management, employing strategies such as pool-based allocation, string deduplication, and non-owning string views to minimize RAM usage. It further optimizes for constrained environments by allowing cons

    C++arduinoarduino-libraryc-plus-plus
    View on GitHub↗7,176
  • protocolbuffers/protobufprotocolbuffers avatar

    protocolbuffers/protobuf

    71,359View on GitHub↗

    Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a schema-driven toolchain that compiles declarative data definitions into type-safe source code, enabling consistent communication and strongly typed API contracts across services written in different programming languages. The project distinguishes itself through a highly efficient binary wire format that utilizes tag-based encoding and variable-width integer compression to minimize payload size and processing overhead. It supports robust evolutionary schema management, allowing d

    C++marshallingprotobufprotobuf-runtime
    View on GitHub↗71,359
  • tokio-rs/prosttokio-rs avatar

    tokio-rs/prost

    4,717View on GitHub↗

    Prost is a Protocol Buffers implementation for Rust that functions as a binary serialization framework and code generator. It translates schema definitions into idiomatic Rust structs and enums, providing the logic necessary to encode and decode structured data into the Protocol Buffers binary format. The project distinguishes itself through a no-std implementation, allowing it to operate in embedded or kernel environments that lack a standard library. It also serves as a schema introspector by emitting file descriptor sets, which enables the programmatic analysis of original schema definitio

    Rustprotobufrust
    View on GitHub↗4,717
See all 30 alternatives to Nanopb→

Frequently asked questions

What does nanopb/nanopb do?

Nanopb is a lightweight C implementation of Protocol Buffers designed for resource-constrained systems and microcontrollers. It functions as both an embedded serialization library for encoding and decoding structured data and a code generator that transforms definition files into compact C source and header files.

What are the main features of nanopb/nanopb?

The main features of nanopb/nanopb are: Embedded Serialization Utilities, Static Memory Allocations, Protocol Buffer Implementations, Data Encoding and Serialization, Incremental Data Streaming, Large Dataset Streaming, Streaming Parsers, Schema-Driven Code Generators.

What are some open-source alternatives to nanopb/nanopb?

Open-source alternatives to nanopb/nanopb include: serde-rs/serde — This project is a framework for the efficient serialization and deserialization of data structures. It provides a… bblanchon/arduinojson — ArduinoJson is a C++ library for parsing and manipulating JSON data and MessagePack binary streams on microcontrollers… protocolbuffers/protobuf — Protocol Buffers is a language-neutral, platform-agnostic mechanism for serializing structured data. It provides a… tokio-rs/prost — Prost is a Protocol Buffers implementation for Rust that functions as a binary serialization framework and code… zserge/jsmn — jsmn is a lightweight JSON parser library written in C. It provides zero-copy tokenization and incremental parsing… fasterxml/jackson — Jackson is a Java data binding framework and multi-format data serializer used to translate data structures into…