Show HN: Protobuf-go-lite: reflection-free protobuf for Go with JSON support

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. protobuf-go-lite

    Reflection-free Protobuf for Go.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. vtprotobuf

    A Protocol Buffers compiler that generates optimized marshaling & unmarshaling Go code for ProtoBuf APIv2

    Hi HN,

    protobuf-go is a widely used binary serialization library and IDL for protobuf in Go. The upstream library leverages reflection to provide a wide variety of features which are useful in a server context.

    Go is increasingly being used for resource-constrained environments like embedded (tinygo) and WebAssembly. In these environments, reflection is not always available, and when it is, it adds significant weight to the binary size.

    vtprotobuf: https://github.com/planetscale/vtprotobuf - compiles static code generation for Protobufs in go, including functions to marshal, unmarshal, size, clone, messages. However, it still requires protobuf-go and the reflection-based code for the message structs.

    protobuf-go-lite takes this one step further with a stripped-down version of the protobuf-go code generator modified to work without reflection and merged with vtprotobuf to provide modular features with static code generation for marshal/unmarshal, size, clone, and equal. It bundles a fork of protoc-gen-go-json for JSON support.

    It has already been used (experimentally) for a reflection-free version of OpenTelemetry for Go: https://github.com/gburek-fastly/opentelemetry-proto-go/pull... as well as other projects at Aperture Robotics.

    Thanks & have a great Friday!

    ~ Christian Stewart

  4. opentelemetry-proto-go

    Generated code for OpenTelemetry protobuf data model (by gburek-fastly)

    Hi HN,

    protobuf-go is a widely used binary serialization library and IDL for protobuf in Go. The upstream library leverages reflection to provide a wide variety of features which are useful in a server context.

    Go is increasingly being used for resource-constrained environments like embedded (tinygo) and WebAssembly. In these environments, reflection is not always available, and when it is, it adds significant weight to the binary size.

    vtprotobuf: https://github.com/planetscale/vtprotobuf - compiles static code generation for Protobufs in go, including functions to marshal, unmarshal, size, clone, messages. However, it still requires protobuf-go and the reflection-based code for the message structs.

    protobuf-go-lite takes this one step further with a stripped-down version of the protobuf-go code generator modified to work without reflection and merged with vtprotobuf to provide modular features with static code generation for marshal/unmarshal, size, clone, and equal. It bundles a fork of protoc-gen-go-json for JSON support.

    It has already been used (experimentally) for a reflection-free version of OpenTelemetry for Go: https://github.com/gburek-fastly/opentelemetry-proto-go/pull... as well as other projects at Aperture Robotics.

    Thanks & have a great Friday!

    ~ Christian Stewart

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • This repository provides the protoc-gen-go-vtproto plug-in for protoc, which is used by Vitess to generate optimized marshall & unmarshal code.

    1 project | /r/golang | 6 Jun 2021
  • Go Protobuf: The New Opaque API

    11 projects | news.ycombinator.com | 16 Dec 2024
  • Code generation for REST inter service communication?

    1 project | /r/microservices | 4 Jul 2023
  • How do I provide bot RPC and REST endpoints?

    3 projects | /r/golang | 22 May 2023
  • gRPC-transcoding large files

    1 project | /r/golang | 17 May 2023