All Projects → gogo → Protobuf

gogo / Protobuf

Licence: other
[Looking for new ownership] Protocol Buffers for Go with Gadgets

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to Protobuf

Protoreflect
Reflection (Rich Descriptors) for Go Protocol Buffers
Stars: ✭ 651 (-86.97%)
Mutual labels:  grpc, protobuf, protocol-buffers
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (-97.42%)
Mutual labels:  grpc, protobuf, protocol-buffers
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (-97.9%)
Mutual labels:  grpc, protobuf, protocol-buffers
Prototool
Your Swiss Army Knife for Protocol Buffers
Stars: ✭ 4,932 (-1.32%)
Mutual labels:  grpc, protobuf, protocol-buffers
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (-95.88%)
Mutual labels:  grpc, protobuf, protocol-buffers
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-97.86%)
Mutual labels:  grpc, protobuf, protocol-buffers
Kroto Plus
gRPC Kotlin Coroutines, Protobuf DSL, Scripting for Protoc
Stars: ✭ 400 (-92%)
Mutual labels:  grpc, protobuf, protocol-buffers
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-97.06%)
Mutual labels:  grpc, protobuf, protocol-buffers
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (-96.4%)
Mutual labels:  grpc, protobuf, protocol-buffers
Buf
A new way of working with Protocol Buffers.
Stars: ✭ 3,328 (-33.41%)
Mutual labels:  grpc, protocol-buffers, protobuf
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-99.7%)
Mutual labels:  protobuf, protocol-buffers, grpc
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-99.44%)
Mutual labels:  protobuf, protocol-buffers, grpc
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (-97.86%)
Mutual labels:  protobuf, protocol-buffers, grpc
Gruf
gRPC Ruby Framework
Stars: ✭ 411 (-91.78%)
Mutual labels:  grpc, protobuf
gruf-demo
A demonstration Rails application utilizing gruf, a gRPC Rails framework.
Stars: ✭ 42 (-99.16%)
Mutual labels:  protobuf, grpc
Protobuf
A pure Elixir implementation of Google Protobuf
Stars: ✭ 442 (-91.16%)
Mutual labels:  protobuf, protocol-buffers
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+243.74%)
Mutual labels:  grpc, protobuf
grpc-spring-security-demo
Spring Boot-based gRPC server with gRPC endpoints secured by Spring Security
Stars: ✭ 50 (-99%)
Mutual labels:  protobuf, grpc
Yarpc Go
A message passing platform for Go
Stars: ✭ 285 (-94.3%)
Mutual labels:  grpc, protobuf
Nrpc
nRPC is like gRPC, but over NATS
Stars: ✭ 440 (-91.2%)
Mutual labels:  grpc, protobuf

GoGo Protobuf looking for new ownership

Protocol Buffers for Go with Gadgets

Build Status GoDoc

gogoprotobuf is a fork of golang/protobuf with extra code generation features.

This code generation is used to achieve:

  • fast marshalling and unmarshalling
  • more canonical Go structures
  • goprotobuf compatibility
  • less typing by optionally generating extra helper code
  • peace of mind by optionally generating test and benchmark code
  • other serialization formats

Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this issue

Release v1.3.0

The project has updated to release v1.3.0. Check out the release notes here.

With this new release comes a new internal library version. This means any newly generated *pb.go files generated with the v1.3.0 library will not be compatible with the old library version (v1.2.1). However, current *pb.go files (generated with v1.2.1) should still work with the new library.

Please make sure you manage your dependencies correctly when upgrading your project. If you are still using v1.2.1 and you update your dependencies, one of which could include a new *pb.go (generated with v1.3.0), you could get a compile time error.

Our upstream repo, golang/protobuf, also had to go through this process in order to update their library version. Here is a link explaining hermetic builds.

Users

These projects use gogoprotobuf:

Please let us know if you are using gogoprotobuf by posting on our GoogleGroup.

Mentioned

Getting Started

There are several ways to use gogoprotobuf, but for all you need to install go and protoc. After that you can choose:

  • Speed
  • More Speed and more generated code
  • Most Speed and most customization

Installation

To install it, you must first have Go (at least version 1.6.3 or 1.9 if you are using gRPC) installed (see http://golang.org/doc/install). Latest patch versions of 1.12 and 1.15 are continuously tested.

Next, install the standard protocol buffer implementation from https://github.com/google/protobuf. Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.14.0 are continuously tested.

Speed

Install the protoc-gen-gofast binary

go get github.com/gogo/protobuf/protoc-gen-gofast

Use it to generate faster marshaling and unmarshaling go code for your protocol buffers.

protoc --gofast_out=. myproto.proto

This does not allow you to use any of the other gogoprotobuf extensions.

More Speed and more generated code

Fields without pointers cause less time in the garbage collector. More code generation results in more convenient methods.

Other binaries are also included:

protoc-gen-gogofast (same as gofast, but imports gogoprotobuf)
protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields)
protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods)

Installing any of these binaries is easy. Simply run:

go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/{binary}
go get github.com/gogo/protobuf/gogoproto

These binaries allow you to use gogoprotobuf extensions. You can also use your own binary.

To generate the code, you also need to set the include path properly.

protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=. myproto.proto

To use proto files from "google/protobuf" you need to add additional args to protoc.

protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=\
Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \
myproto.proto

Note that in the protoc command, {binary} does not contain the initial prefix of "protoc-gen".

Most Speed and most customization

Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. gogoprotobuf also offers more serialization formats and generation of tests and even more methods.

Please visit the extensions page for more documentation.

Install protoc-gen-gogo:

go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/jsonpb
go get github.com/gogo/protobuf/protoc-gen-gogo
go get github.com/gogo/protobuf/gogoproto

GRPC

It works the same as golang/protobuf, simply specify the plugin. Here is an example using gofast:

protoc --gofast_out=plugins=grpc:. my.proto

See https://github.com/gogo/grpc-example for an example of using gRPC with gogoprotobuf and the wider grpc-ecosystem.

License

This software is licensed under the 3-Clause BSD License ("BSD License 2.0", "Revised BSD License", "New BSD License", or "Modified BSD License").

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].