{"repo":"planetscale/vtprotobuf","free":true,"listed":false,"github":"https://github.com/planetscale/vtprotobuf","clone":"git clone https://github.com/planetscale/vtprotobuf.git","description":"A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2","language":"Go","stars":1112,"topics":["go","protobuf","grpc","codegen","vitess"],"license":"BSD-3-Clause","category":"networking-infra","readme_excerpt":"vtprotobuf , the Vitess Protocol Buffers compiler This repository provides the protoc-gen-go-vtproto plug-in for protoc , which is used by Vitess to generate optimized marshall & unmarshal code. The code generated by this compiler is based on the optimized code generated by gogo/protobuf , although this package is not a fork of the original gogo compiler, as it has been implemented to support the new ProtoBuf APIv2 packages. Available features vtprotobuf is implemented as a helper plug-in that must be run alongside the upstream protoc-gen-go generator, as it generates fully-compatible auxiliary code to speed up (de)serialization of Protocol Buffer messages. The following features can be generated: - size : generates a func (p YourProto) SizeVT() int helper that behaves identically to calling proto.Size(p) on the message, except the size calculation is fully unrolled and does not use reflection. This helper function can be used directly, and it'll also be used by the marshal codegen to ensure the destination buffer is properly sized before ProtoBuf objects are marshalled to it. - equal : generates the following helper methods - func (this YourProto) EqualVT(that YourProto) bool : this function behaves almost identically to calling proto.Equal(this, that) on messages, except the equality calculation is fully unrolled and does not use reflection. This helper function can be used directly. - func (this YourProto) EqualMessageVT(thatMsg proto.Message) bool : this function behaves ","default_branch":null,"files":null,"tree":[],"storefront":"/r/planetscale","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/planetscale/vtprotobuf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}