Reference documentation for working with protocol buffer classes in Python.| protobuf.dev
Describes how Python compares objects.| protobuf.dev
This section contains reference documentation for working with protocol buffer classes in C++.| protobuf.dev
Standard MIME types for Protobuf Serializations.| protobuf.dev
Avoid using features where they are not needed.| protobuf.dev
The protocol buffer compiler, protoc, is used to compile .proto files, which contain service and message definitions. Choose one of the methods given below to install protoc. Install Pre-compiled Binaries (Any OS) To install the latest release of the protocol compiler from pre-compiled binaries, follow these instructions: From https://github.com/google/protobuf/releases, manually download the zip file corresponding to your operating system and computer architecture (protoc-<version>-<os>-<arc...| Protocol Buffers on Protocol Buffers Documentation
We have heard feedback that some folks would like protobuf to support nullable getters/setters in their null-friendly language of choice (particularly Kotlin, C#, and Rust). While this does seem to be a helpful feature for folks using those languages, the design choice has tradeoffs which have led to the Protobuf team choosing not to implement them. The biggest reason not to have nullable fields is the intended behavior of default values specified in a .| Protocol Buffers on Protocol Buffers Documentation
Covers various string_view migrations| protobuf.dev
Clients and servers are never updated at exactly the same time - even when you try to update them at the same time. One or the other may get rolled back. Don’t assume that you can make a breaking change and it’ll be okay because the client and server are in sync. Don’t Re-use a Tag Number Never re-use a tag number. It messes up deserialization. Even if you think no one is using the field, don’t re-use a tag number.| Protocol Buffers on Protocol Buffers Documentation
All proto definitions should have one top-level element and build target per file.| protobuf.dev
Any differences between proto2 and proto3 generated code are highlighted - note that these differences are in the generated code as described in this document, not the base API, which are the same in both versions. You should read the proto2 language guide and/or the proto3 language guide before reading this document. Note You are looking at documentation for the Opaque API, which is the current version. If you are working with .| Protocol Buffers on Protocol Buffers Documentation
The Opaque API is the latest version of the Protocol Buffers implementation for the Go programming language. The old version is now called Open Struct API. See the Go Protobuf: Releasing the Opaque API blog post for an introduction. The migration to the Opaque API happens incrementally, on a per-proto-message or per-.proto-file basis, by setting the Protobuf Editions feature api_level option to one of its possible values: API_OPEN selects the Open Struct API; this was the only API before Dece...| Protocol Buffers on Protocol Buffers Documentation
The Opaque API is the latest version of the Protocol Buffers implementation for the Go programming language. The old version is now called Open Struct API. See the Go Protobuf: Releasing the Opaque API blog post for an introduction. This is a user guide for migrating Go Protobuf usages from the older Open Struct API to the new Opaque API. Warning You are looking at the manual migration guide. Typically you’re better off using the open2opaque tool to automate the migration.| Protocol Buffers on Protocol Buffers Documentation
A list of frequently asked questions about the Opaque API.| protobuf.dev
This page describes exactly what Rust code the protocol buffer compiler generates for any given protocol definition. Any differences between proto2 and proto3 generated code are highlighted. You should read the proto2 language guide and/or proto3 language guide before reading this document. Protobuf Rust Protobuf Rust is an implementation of protocol buffers designed to be able to sit on top of other existing protocol buffer implementations that we refer to as ‘kernels’.| Protocol Buffers on Protocol Buffers Documentation
Use the standard fmt::Debug ("{:?}" in format strings) on Protobuf messages for human-readable strings for logging, error messages, exceptions, and similar use cases. The output of this debug info is not intended to be machine-readable (unlike TextFormat and JSON which are not be used for debug output). Using fmt::Debug enables redaction of some sensitive fields. Note that under upb kernel this redaction is not yet implemented, but is expected to be added.| Protocol Buffers on Protocol Buffers Documentation
The process of building a Rust library for a Protobuf definition is similar to other programming languages: Use the language-agnostic proto_library rule: proto_library( name = "person_proto", srcs = ["person.proto"], ) Create a Rust library: load("//third_party/protobuf/rust:defs.bzl", "rust_proto_library") proto_library( name = "person_proto", srcs = ["person.proto"], ) rust_proto_library( name = "person_rust_proto", deps = [":person_proto"], ) Use the library by including it in a Rust binar...| Protocol Buffers on Protocol Buffers Documentation
Explains some of the design choices that the Rust Proto implementation makes.| protobuf.dev
The C++ implementation of Protocol Buffers has an explicit dependency on Abseil.| protobuf.dev
An overview of the Protobuf Editions functionality.| protobuf.dev
This topic provides an overview of the features that are included in Edition 2023. Each subsequent edition’s features will be added to this topic. We announce new editions in the News section. Prototiller Prototiller is a command-line tool that converts proto2 and proto3 definition files to Editions syntax. It hasn’t been released yet, but is referenced throughout this topic. Features The following sections include all of the behaviors that are configurable using features in Edition 2023.| Protocol Buffers on Protocol Buffers Documentation
This topic explains how to implement editions in new runtimes and generators. Overview Edition 2023 The first edition released is Edition 2023, which is designed to unify proto2 and proto3 syntax. The features we’ve added to cover the difference in behaviors are detailed in Feature Settings for Editions. Feature Definition In addition to supporting editions and the global features we’ve defined, you may want to define your own features to leverage the infrastructure.| Protocol Buffers on Protocol Buffers Documentation
A basic C++ programmers introduction to working with protocol buffers.| protobuf.dev
This tutorial provides a basic C# programmer’s introduction to working with protocol buffers, using the proto3 version of the protocol buffers language. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use the C# protocol buffer API to write and read messages. This isn’t a comprehensive guide to using protocol buffers in C#. For more detailed reference information, see the Protocol Buff...| Protocol Buffers on Protocol Buffers Documentation
This tutorial provides a basic Dart programmer’s introduction to working with protocol buffers, using the proto3 version of the protocol buffers language. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use the Dart protocol buffer API to write and read messages. This isn’t a comprehensive guide to using protocol buffers in Dart . For more detailed reference information, see the Protoc...| Protocol Buffers on Protocol Buffers Documentation
This tutorial provides a basic Java programmer’s introduction to working with protocol buffers. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use the Java protocol buffer API to write and read messages. This isn’t a comprehensive guide to using protocol buffers in Java. For more detailed reference information, see the Protocol Buffer Language Guide (proto2), the Protocol Buffer Langu...| Protocol Buffers on Protocol Buffers Documentation
This tutorial provides a basic Kotlin programmer’s introduction to working with protocol buffers, using the proto3 version of the protocol buffers language. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use the Kotlin protocol buffer API to write and read messages. This isn’t a comprehensive guide to using protocol buffers in Kotlin. For more detailed reference information, see the P...| Protocol Buffers on Protocol Buffers Documentation
This tutorial provides a basic Python programmer’s introduction to working with protocol buffers. By walking through creating a simple example application, it shows you how to Define message formats in a .proto file. Use the protocol buffer compiler. Use the Python protocol buffer API to write and read messages. This isn’t a comprehensive guide to using protocol buffers in Python. For more detailed reference information, see the Protocol Buffer Language Guide (proto2), the Protocol Buffer...| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted - note that these differences are in the generated code as described in this document, not the base message classes/interfaces, which are the same in both versions. You should read the proto2 language guide and/or proto3 language guide before reading this document. Compiler Invocation The protocol buffer compiler produces C++ output when invoked with the --cpp_out= command-line flag. The parameter to the --cpp_out= optio...| Protocol Buffers on Protocol Buffers Documentation
This page describes exactly what C++ code the protocol buffer compiler generates in addition to the code described in the C++ Generated Code Guide when arena allocation is enabled. It assumes that you are familiar with the material in the language guide and the C++ Generated Code Guide. Why Use Arena Allocation? Memory allocation and deallocation constitutes a significant fraction of CPU time spent in protocol buffers code. By default, protocol buffers performs heap allocations for each messa...| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted - note that these differences are in the generated code as described in this document, not the base API, which are the same in both versions. You should read the proto2 language guide and/or the proto3 language guide before reading this document. Compiler Invocation The protocol buffer compiler requires a plugin to generate Dart code. Installing it following the instructions provides a protoc-gen-dart binary which protoc...| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted - note that these differences are in the generated code as described in this document, not the base API, which are the same in both versions. You should read the proto2 language guide and/or the proto3 language guide before reading this document. Compiler Invocation The protocol buffer compiler requires a plugin to generate Go code. Install it using Go 1.16 or higher by running:| Protocol Buffers on Protocol Buffers Documentation
Versions What’s the difference between github.com/golang/protobuf and google.golang.org/protobuf? The github.com/golang/protobuf module is the original Go protocol buffer API. The google.golang.org/protobuf module is an updated version of this API designed for simplicity, ease of use, and safety. The flagship features of the updated API are support for reflection and a separation of the user-facing API from the underlying implementation. We recommend that you use google.golang.org/protobuf ...| Protocol Buffers on Protocol Buffers Documentation
The proto.Size function returns the size in bytes of the wire-format encoding of a proto.Message by traversing all its fields (including submessages). In particular, it returns the size of how Go Protobuf will encode the message. Typical usages Identifying empty messages Checking if proto.Size returns 0 is an easy way to recognize empty messages: if proto.Size(m) == 0 { // No fields set (or, in proto3, all fields matching the default); // skip processing this message, or return an error, or s...| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted—note that these differences are in the generated code as described in this document, not the base message classes/interfaces, which are the same in both versions. You should read the proto2 language guide and/or proto3 language guide before reading this document. Note that no Java protocol buffer methods accept or return nulls unless otherwise specified. Compiler Invocation The protocol buffer compiler produces Java ou...| Protocol Buffers on Protocol Buffers Documentation
This document contains information on what the fully-qualified Java name of a proto is, based on the different proto options. This name corresponds to the package you need to import to use that message. NOTE: The java_package and java_alt_api_package options are interpreted relative to the API indicated by java_api_version. For example, if java_api_version is 1, then the proto1 package will be java_package and the proto2 package (the “alternative” API) will be java_alt_api_package.| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted—note that these differences are in the generated code as described in this document, not the base message classes/interfaces, which are the same in both versions. You should read the proto2 language guide and/or proto3 language guide before reading this document. Compiler Invocation The protocol buffer compiler produces Kotlin code that builds on top of Java code. As a result, it must be invoked with two command-line f...| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted. You should read the proto2 language guide and/or proto3 language guide before reading this document. Compiler invocation The protocol buffer compiler produces Objective-C output when invoked with the --objc_out= command-line flag. The parameter to the --objc_out= option is the directory where you want the compiler to write your Objective-C output. The compiler creates a header file and an implementation file for each .| Protocol Buffers on Protocol Buffers Documentation
You should read the proto3 language guide before reading this document. Note that the protocol buffer compiler currently only supports proto3 code generation for PHP. Compiler Invocation The protocol buffer compiler produces PHP output when invoked with the --php_out= command-line flag. The parameter to the --php_out= option is the directory where you want the compiler to write your PHP output. In order to conform to PSR-4, the compiler creates a sub-directory corresponding to the package def...| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Any differences between proto2 and proto3 generated code are highlighted - note that these differences are in the generated code as described in this document, not the base message classes/interfaces, which are the same in both versions. You should read the proto2 language guide and/or proto3 language guide before reading this document. The Python Protocol Buffers implementation is a little different from C++ and Java. In Python, the compiler only outputs code to build descriptors for the gen...| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
You should read the language guides for proto2 or proto3 before reading this document. The protocol compiler for Ruby emits Ruby source files that use a DSL to define the message schema. However the DSL is still subject to change. In this guide we only describe the API of the generated messages, and not the DSL. Compiler Invocation The protocol buffer compiler produces Ruby output when invoked with the --ruby_out= command-line flag.| Protocol Buffers on Protocol Buffers Documentation
The syntax is specified using Extended Backus-Naur Form (EBNF): | alternation () grouping [] option (zero or one time) {} repetition (any number of times) Lexical Elements Letters and Digits letter = "A" ... "Z" | "a" ... "z" capitalLetter = "A" ... "Z" decimalDigit = "0" ... "9" octalDigit = "0" ... "7" hexDigit = "0" ... "9" | "A" ... "F" | "a" ... "f" Identifiers ident = letter { letter | decimalDigit | "_" } fullIdent = ident { ".| Protocol Buffers on Protocol Buffers Documentation
The syntax is specified using Extended Backus-Naur Form (EBNF): | alternation () grouping [] option (zero or one time) {} repetition (any number of times) For more information about using proto2, see the language guide. Lexical Elements Letters and Digits letter = "A" ... "Z" | "a" ... "z" capitalLetter = "A" ... "Z" decimalDigit = "0" ... "9" octalDigit = "0" ... "7" hexDigit = "0" ... "9" | "A" .| Protocol Buffers on Protocol Buffers Documentation
The protocol buffer Text Format Language specifies a syntax for representation of protobuf data in text form, which is often useful for configurations or tests.| protobuf.dev
API documentation for the google.protobuf package.| protobuf.dev
While the current release includes compilers and APIs for C++, Java, Go, Ruby, C#, and Python, the compiler code is designed so that it’s easy to add support for other languages. There are several ongoing projects to add new language implementations to Protocol Buffers, including C, Haskell, Perl, Rust, and more. For a list of links to projects we know about, see the third-party add-ons wiki page. Compiler Plugins protoc, the Protocol Buffers Compiler, can be extended to support new languag...| Protocol Buffers on Protocol Buffers Documentation
Support windows for protoc and the various languages are covered in the tables later in this topic. Version numbers throughout this topic use SemVer conventions; in the version “3.21.7,” we say that “3” is the major version, “21” is the minor version, and “7” is the micro or patch number. Starting with the v20.x protoc release, we changed our versioning scheme to enable nimbler updates to language-specific parts of Protocol Buffers.| Protocol Buffers on Protocol Buffers Documentation
Compiler Changes in v22.0 JSON Field Name Conflicts Source of changes: PR #11349, PR #10750 We’ve made some subtle changes in how we handle field name conflicts with respect to JSON mappings. In proto3, we’ve partially loosened the restrictions and only give errors when field names produce case-sensitive JSON mappings (camel case of the original name). We now also check the json_name option, and give errors for case-sensitive conflicts. In proto2, we’ve tightened restrictions a bit and ...| Protocol Buffers on Protocol Buffers Documentation
Protobuf language bindings have two components. The generated code (typically produced from protoc) and the runtime libraries that must be included when using the generated code. When these come from different releases of protobuf, we are in a “cross version runtime” situation. We intend to offer the following guarantees across all languages except C++. These are the default guarantees; however, owners of protobuf code generators and runtimes may explicitly override them with more specifi...| Protocol Buffers on Protocol Buffers Documentation
Release Packages Latest Version The latest release of Protocol Buffers can be found on the release page. Old Versions Older versions are available in our historical releases on GitHub. Source Code GitHub Repository Protocol Buffers source code is hosted on GitHub.| Protocol Buffers on Protocol Buffers Documentation
Understanding why protobuf was created and the decisions that changed it over time can help you to better use the features of the tool. Why Did You Release Protocol Buffers? There are several reasons that we released Protocol Buffers. Protocol buffers are used by many projects inside Google. We had other projects we wanted to release as open source that use protocol buffers, so to do this, we needed to release protocol buffers first.| Protocol Buffers on Protocol Buffers Documentation
| Protocol Buffers on Protocol Buffers Documentation
Syntax Reflection Deprecation v23 will deprecate the ability to check syntax version using reflection. The deprecation will be included as warnings at build time. The capability will be removed in a future release. Adding support for ctype=CORD in C++ v23 will add ctype=CORD support for singular bytes fields, including oneof fields, to specify that data should be stored using absl::cord instead of string. Support may be added in future releases for singular string field types and for repeated...| Protocol Buffers on Protocol Buffers Documentation
Changes to Ruby Generator This GitHub PR, which will appear in the 23.x release, changes the Ruby code generator to emit a serialized proto instead of the DSL. It removes the DSL from the code generator in anticipation of splitting the DSL out into a separate package. Given a .proto file like: syntax = "proto3"; package pkg; message TestMessage { optional int32 i32 = 1; optional TestMessage msg = 2; } Generated code before:| Protocol Buffers on Protocol Buffers Documentation
Stricter validation for json_name v24 will forbid embedded null characters in the json_name field option. Going forward, any valid Unicode characters will be accepted, except \u0000. Null will still be allowed in field values. Previously, the proto compiler allowed null characters, but support for this was inconsistent across languages and implementations. To fix this, we are clarifying the spec to say that null is not allowed in json_name, and will be rejected by the compiler.| Protocol Buffers on Protocol Buffers Documentation
Python Breaking Change In v25 message.UnknownFields() will be deprecated in pure Python and C++ extensions. It will be removed in v26. Use the new UnknownFieldSet(message) support in unknown_fields.py as a replacement.| Protocol Buffers on Protocol Buffers Documentation
This topic covers two areas: general platform support changes, and C++-specific changes that are being considered for the 22.x release line. Platform Support Changes We’ve added guidance about the platforms that we support in this section of the documentation. The section currently covers C++ and PHP, but may be expanded with information about other platforms in the future. Official C++ Support Matrix With the policy, mentioned earlier in this announcement, of using Google’s official foun...| Protocol Buffers on Protocol Buffers Documentation
.NET support policy The Protobuf team supports .NET in two ways: Generation of C# code by protoc The Google.Protobuf NuGet package, which provides runtime support for the generated code, as well as reflection and other facilities The support policy for these has previously been unclear, particularly in terms of which .NET runtimes are supported. From August 2023 onwards, support will be provided in accordance with the Google Open Source support policy for .| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/arena.h> namespace google::protobuf This file defines an Arena allocator for better allocation performance. Classes in this fileArenaOptionsArenaOptions provides optional additional parameters to arena construction that control its block-allocation behavior. ArenaArena allocator. Arena::InternalHelperArena::is_arena_constructableHelper typetraits that indicates support for arenas in a type T at compile time. Arena::is_destructor_skippablestruct ArenaOptions#include <...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/stubs/common.h> namespace google::protobuf Contains basic types and utilities used by the rest of the library. Classes in this file| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/code_generator.h> namespace google::protobuf::compiler Defines the abstract interface implemented by each of the language-specific code generators. Classes in this fileCodeGeneratorThe abstract interface to a class which generates code implementing a particular proto file in a particular language. GeneratorContextCodeGenerators generate one or more files in a given directory. File MembersThese definitions are not part of any class.typedefGeneratorContext Out...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/command_line_interface.h> namespace google::protobuf::compiler Implements the Protocol Compiler front-end such that it may be reused by custom compilers written to support other languages. Classes in this fileCommandLineInterfaceThis class implements the command-line interface to the protocol compiler. class CommandLineInterface#include <google/protobuf/compiler/command_line_interface.h> namespace google::protobuf::compiler This class implements the command-...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/cpp/cpp_generator.h> namespace google::protobuf::compiler::cpp Generates C++ code for a given .proto file. Classes in this fileCppGeneratorCodeGenerator implementation which generates a C++ source file and header. class CppGenerator: public CodeGenerator#include <google/protobuf/compiler/cpp/cpp_generator.h> namespace google::protobuf::compiler::cpp CodeGenerator implementation which generates a C++ source file and header. If you create your own protocol com...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/csharp/csharp_generator.h> namespace google::protobuf::compiler::csharp Generates C# code for a given .proto file. Classes in this fileGeneratorCodeGenerator implementation which generates a C# source file and header. class Generator: public CodeGenerator#include <google/protobuf/compiler/csharp/csharp_generator.h> namespace google::protobuf::compiler::csharp CodeGenerator implementation which generates a C# source file and header. If you create your own pro...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/csharp/csharp_names.h> namespace google::protobuf::compiler::csharp Provides a mechanism for mapping a descriptor to the fully-qualified name of the corresponding C# class. Classes in this fileFile MembersThese definitions are not part of any class.std::stringGetFileNamespace(const FileDescriptor * descriptor)Requires: more...std::stringGetClassName(const Descriptor * descriptor)Requires: more...std::stringGetReflectionClassName(const FileDescriptor * descri...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/importer.h> namespace google::protobuf::compiler This file is the public interface to the .proto file parser. Classes in this fileSourceTreeDescriptorDatabaseAn implementation of DescriptorDatabase which loads files from a SourceTree and parses them. ImporterSimple interface for parsing .proto files. MultiFileErrorCollectorIf the importer encounters problems while trying to import the proto files, it reports them to a MultiFileErrorCollector. SourceTreeAbstr...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/java/java_generator.h> namespace google::protobuf::compiler::java Generates Java code for a given .proto file. Classes in this fileJavaGeneratorCodeGenerator implementation which generates Java code. class JavaGenerator: public CodeGenerator#include <google/protobuf/compiler/java/java_generator.h> namespace google::protobuf::compiler::java CodeGenerator implementation which generates Java code. If you create your own protocol compiler binary and you want it ...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/java/java_names.h> namespace google::protobuf::compiler::java Provides a mechanism for mapping a descriptor to the fully-qualified name of the corresponding Java class. Classes in this fileFile MembersThese definitions are not part of any class.std::stringClassName(const Descriptor * descriptor)Requires: more...std::stringClassName(const EnumDescriptor * descriptor)Requires: more...std::stringClassName(const FileDescriptor * descriptor)Requires: more...std::...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/javanano/javanano_generator.h> namespace google::protobuf::compiler::javanano Generates Java nano code for a given .proto file. Classes in this fileJavaNanoGeneratorCodeGenerator implementation which generates Java nano code. class JavaNanoGenerator: public CodeGenerator#include <google/protobuf/compiler/javanano/javanano_generator.h> namespace google::protobuf::compiler::javanano CodeGenerator implementation which generates Java nano code. If you create you...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/js/js_generator.h> namespace google::protobuf::compiler::js Generates JavaScript code for a given .proto file. Classes in this fileGeneratorOptionsGeneratorCodeGenerator implementation which generates a JavaScript source file and header. struct GeneratorOptions#include <google/protobuf/compiler/js/js_generator.h> namespace google::protobuf::compiler::js MembersenumImportStyleWhat style of imports should be used. more...enumOutputMode more...std::stringoutput...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/objectivec/objectivec_generator.h> namespace google::protobuf::compiler::objectivec Generates ObjectiveC code for a given .proto file. Classes in this fileObjectiveCGeneratorCodeGenerator implementation which generates a ObjectiveC source file and header. class ObjectiveCGenerator: public CodeGenerator#include <google/protobuf/compiler/objectivec/objectivec_generator.h> namespace google::protobuf::compiler::objectivec CodeGenerator implementation which gener...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h> namespace google::protobuf::compiler::objectivec Helper functions for generating ObjectiveC code. Classes in this fileOptionsGenerator options (see objectivec_generator.cc for a description of each): TextFormatDecodeDataGenerate decode data needed for ObjC's GPBDecodeTextFormatName() to transform the input into the expected output. LineConsumerHelper for parsing simple files. ImportWriterHelper class for parsing framework imp...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/parser.h> namespace google::protobuf::compiler Implements parsing of .proto files to FileDescriptorProtos. Classes in this fileParserImplements parsing of protocol definitions (such as .proto files). SourceLocationTableA table mapping (descriptor, ErrorLocation) pairs – as reported by DescriptorPool when validating descriptors – to line and column numbers within the original source code. class Parser#include <google/protobuf/compiler/parser.h> namespace ...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/plugin.h> namespace google::protobuf::compiler Front-end for protoc code generator plugins written in C++. To implement a protoc plugin in C++, simply write an implementation of CodeGenerator, then create a main() function like: int main(int argc, char* argv[]) { MyCodeGenerator generator; return google::protobuf::compiler::PluginMain(argc, argv, &generator); } You must link your plugin against libprotobuf and libprotoc. The core part of PluginMain is to inv...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/plugin.pb.h> namespace google::protobuf::compiler API for protoc plugins. This file defines a set of protocol message classes which make up the API to protoc code generator plugins. Plugins written in C++ should probably build on the API in plugin.h instead of dealing with the protobuf-level API, but plugins in other languages will need to deal with the raw messages as defined below. The protocol compiler currently doesn't support auto-generated documentatio...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/python/python_generator.h> namespace google::protobuf::compiler::python Generates Python code for a given .proto file. Classes in this fileGeneratorCodeGenerator implementation for generated Python protocol buffer classes. class Generator: public CodeGenerator#include <google/protobuf/compiler/python/python_generator.h> namespace google::protobuf::compiler::python CodeGenerator implementation for generated Python protocol buffer classes. If you create your o...| Protocol Buffers on Protocol Buffers Documentation
#include <google/protobuf/compiler/ruby/ruby_generator.h> namespace google::protobuf::compiler::ruby Generates Ruby code for a given .proto file. Classes in this fileGeneratorCodeGenerator implementation for generated Ruby protocol buffer classes. class Generator: public CodeGenerator#include <google/protobuf/compiler/ruby/ruby_generator.h> namespace google::protobuf::compiler::ruby CodeGenerator implementation for generated Ruby protocol buffer classes. If you create your own protocol compil...| Protocol Buffers on Protocol Buffers Documentation
Language specification reference for version 3 of the Protocol Buffers language (proto3).| protobuf.dev
--- title: “C# API” manualLink: “/reference/csharp/api-docs” manualLinkTarget: “_blank” weight: 560| Protocol Buffers Documentation – C# Reference
Describes exactly what C# code the protocol buffer compiler generates for protocol definitions using proto3 syntax.| protobuf.dev
A basic Go programmers introduction to working with protocol buffers.| protobuf.dev
Protocol Buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data.| protobuf.dev