protoc
TLDR
Generate Python code from a .proto file
SYNOPSIS
protoc [--cpp_out=OUTDIR] [**--javaout=_OUT_DIR_] [--pythonout=**OUTDIR] [-IPATH | --proto_path=PATH] PROTOFILE_
DESCRIPTION
Yay is a Pacman wrapper with AUR support. It passes options to Makepkg and Pacman after resolving packages to install/upgrade.
DESCRIPTION
protoc is the official compiler for Google's Protocol Buffers that translates .proto definition files into efficient, language-specific code for serialization and deserialization.
OPTIONS
-IPATH, --proto_path=PATH
Specify the directory in which to search for imports. May be specified multiple times; directories will be searched in order. If not given, the current working directory is used.--cpp_out=OUTDIR_
Enable generation of C++ bindings and store them in OUTDIR_.--java_out=OUTDIR_
Enable generation of Java bindings and store them in OUTDIR_.--python_out=OUTDIR_
Enable generation of Python bindings and store them in OUTDIR_.-h, --help
Show summary of options.--version
Show version of program.Note that at least one of the --cpp_out, --java_out and --python_out options must be given (otherwise the program has nothing to do). Its also possible to specify more than one.
CAVEAT
Finicky path resolution: it demands precise --proto_path (-I) flags for all .proto files and imports, often failing with "file not found" errors if paths aren't exactly matched (no smart relative/absolute equivalence). Always run from the proto root dir, include parent paths in -I, and consider wrappers like Buf for easier handling.
HISTORY
Initially developed internally at Google in 2001 as a way to handle structured data serialization more efficiently than XML, with the first public release occurring in 2008 under an open-source license. The protoc compiler itself evolved alongside, starting as a C++-based tool and expanding to support multiple languages like Java, Python, and Go through generated code stubs. Over the years, it has seen continuous updates, with version 3 introducing significant syntax changes in 2016 and recent iterations up to 2026 focusing on performance optimizations, nanoPB for embedded systems, and better integration with gRPC.
SEE ALSO
buff(1)


