Protoc
protoc is the Protocol Buffers compiler that parses .proto schema definitions and generates language-specific source code and related artifacts.
gRPC Microservices in Go
protoc is the Protocol Buffers compiler that translates schema definitions into generated source code and related artifacts.
- How it is used
- Generates Go message code and gRPC stubs from service contracts so microservices can exchange requests and responses.
- How deep it goes
- Details installation, generation flags, output files, client use and CI automation; leaves service business logic to implementers.
- Examples
- Uses Payment and Order RPC definitions, protoc commands, generated Go clients and a tag-triggered workflow for three services.
- What you can do after
- Apply it via protoc to generate Go clients and servers, then automate their publication with GitHub Actions.
Learn Go with Pocket-Sized Projects
protoc is the Protocol Buffers compiler that parses .proto schemas and invokes generators to produce source code.
- How it is used
- Generates Go message and gRPC service code from .proto schemas for a habits tracker API.
- How deep it goes
- Explains installation, plugins, output paths, imports, multi-file compilation, and repeatable generation commands.
- Examples
- Uses habit.proto and service.proto, generated Go files, installation commands, and a complete multi-plugin compilation command.
- What you can do after
- Build it from scratch by installing protoc, configuring Go plugins, and generating message and gRPC service files.
Read how Learn Go with Pocket-Sized Projects explains protoc →
Go in Practice, Second Edition
protoc is the Protocol Buffer compiler that parses .proto definitions and generates source code for supported languages.
- How it is used
- Generates typed message and service scaffolding for gRPC communication between applications.
- How deep it goes
- Explains the compiler’s role, proto3 inputs, and generation command without descending into compiler internals.
- Examples
- Uses a chat-service proto3 definition and a protoc command generating Go and gRPC output.
- What you can do after
- Operate/configure protoc to generate Go clients and service scaffolding from a proto3 contract.
Cloud Observability in Action
protoc is the Protocol Buffers compiler and decoder for compiling .proto definitions and serializing or deserializing protobuf messages.
- How it is used
- Uses protoc to compile .proto definitions and decode protobuf data while debugging profiling artifacts.
- How deep it goes
- Defines its role and demonstrates one decoding pipeline, but stops short of installation, compilation setup, or decoder internals.
- Examples
- Uses a compressed pprof profile, profile.proto, and a Function-message decode filtered for a task name.
- What you can do after
- Diagnose protobuf-backed profiling data by extracting a file and decoding a selected message with protoc.
Related concepts
- proto fileuses · A proto file is a Protocol Buffers schema-definition file that declares structured message types and service interfaces for generating code.
- code generationused by · Code generation is the production of program code by transforming inputs such as specifications, models, templates, or existing representations.
- stubproduces · A stub is a stand-in for a component or operation that exposes an interface while substituting simplified, generated, or controlled behavior for its full implementation.
- protoc-gen-gouses · protoc-gen-go is a protoc plugin that generates Go types and related code from Protocol Buffers schemas.
- protoc-gen-go-grpcuses · protoc-gen-go-grpc is a protoc plugin that generates Go gRPC client and server code from Protocol Buffers service definitions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



