Is there a good C implementation of Google Protocol Buffers

Use protobuf-c (now at Github as protobuf-c).

From their official site:

This package provides a code generator and runtime libraries to use Protocol Buffers from pure C (not C++).

It uses a modified version of protoc called protoc-c.


pbtools is another alternative. It generates fast C source code to encode and decode protobuf messages.

Also, there is a list of more C implementations here: https://github.com/protocolbuffers/protobuf/blob/master/docs/third_party.md


There's also Nanopb which is more light-weight.

For example, it does not store message and field names in the code, so introspection (searching a field by name) is not possible.