One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

protocolbuffers/protobuf

71,769+4 todayC++

Protobuf is Google's shared data format that lets programs in different languages talk to each other

Protocol Buffers, or Protobuf, is Google's serialization format that turns a program's structured data into a compact form that can be saved or sent over a network. Developers define their data shapes in .proto files, and the protoc compiler generates matching code for languages like C++, Java, and Python. The repository, with 71769 stars, bundles the compiler along with runtime libraries for multiple languages.

What it does

  1. Defines a language- and platform-neutral way to serialize (convert into a storable/transmittable form) structured data
  2. You write your data structure once in a .proto file, and the protoc compiler generates matching code for C++, Java, Python, C#, Ruby, PHP, and more
  3. Go, JavaScript, and Dart support live in separate companion repositories
  4. Projects using the Bazel build system can add protobuf as a dependency via Bzlmod (Bazel 8+) or the older WORKSPACE method
  5. The project recommends pinning to official releases rather than the main branch head, since the head can break compatibility unexpectedly

Why it matters

When a server and a client written in different languages, or systems from different companies, need to exchange data, they need a shared set of rules, and Protobuf is one of the most widely used standards for that. Anyone building APIs, microservices, or gRPC-based communication is likely to encounter this format in practice.

Terms in this repo

  • serialization · the process of converting a program's data into a form that can be stored or transmitted
  • protoc · the protobuf compiler that reads .proto files and generates code for each programming language
  • .proto file · a protobuf-specific configuration file that defines the structure (fields, types) of data to be exchanged
  • Bazel / Bzlmod · Google's build system and its dependency management mechanism
  • runtime · the library needed for generated code to actually work at execution time

Repository description (English)

Protocol Buffers - Google's data interchange format

Open on GitHub

Trending repos

All repos →

Latest from METAL LAB