A Google Protocol Buffers library for C that works without code generation.
PBC is a C library implementation of Google Protocol Buffers that enables serialization and deserialization of structured data without requiring code generation. It allows C developers to work with protocol buffer messages directly through runtime APIs, making it easier to integrate with existing C codebases. The library provides both a flexible Message API and a high-performance Pattern API for different use cases.
C developers who need to implement Protocol Buffers serialization in their applications, particularly those who want to avoid the complexity of code generation or need runtime flexibility with .proto files.
PBC's main advantage is eliminating the code generation step required by Google's official implementation, making protocol buffers more accessible and flexible for C projects. It offers both ease of use through its Message API and high performance through its Pattern API, giving developers options based on their specific needs.
A protocol buffers library for C
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates the need to compile .proto files, allowing dynamic use of protocol buffers at runtime, which is ideal for flexible schemas or embedded systems.
Offers a user-friendly Message API for easy encoding/decoding and a high-performance Pattern API that accesses data in native C structs for speed and memory efficiency.
Includes Lua bindings out of the box, enabling seamless integration with Lua scripts for rapid prototyping or scripting without extra dependencies.
Handles protocol buffer extensions with a simple prefix-based approach, making it adaptable to extended .proto definitions without complex workarounds.
Explicitly lacks support for service definitions in .proto files, limiting its use for RPC-based applications that rely on generated service stubs.
While the Pattern API offers better performance, it requires manual setup to map data to C structs, adding development overhead compared to the Message API.
Key design details are linked to a blog post in Chinese, and the README is minimal, which can hinder adoption for non-Chinese speakers or those needing comprehensive guides.