Overview of upb features and limitations
mainupb (μpb) is a small, fast C implementation of Protocol Buffers. It is used as the core runtime for Ruby, PHP, and Python protobuf extensions.
Supported Features
- Generated API (in C)
- Reflection
- Binary & JSON wire formats
- Text format serialization
- Standard protobuf features (oneofs, maps, unknown fields, extensions, etc.)
- Full conformance with protobuf conformance tests
- Optional reflection: Generated messages are agnostic to whether reflection is linked.
- No global state: No pre-main registration or other global state.
- Fast reflection-based parsing: Runtime-loaded messages parse as fast as compiled-in messages.
Unsupported Features
- Text format parsing
- Deep descriptor verification (validation is not as exhaustive as
protoc)
Important Note on C Usage
While upb offers a C API, the C API & ABI are not stable. It is not generally intended to be used as a C library for direct consumption.