# planetscale/vtprotobuf

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

Repository: https://github.com/planetscale/vtprotobuf
Canonical: https://ross.abutalabs.com/products/vtprotobuf
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: go, protobuf, grpc, codegen, vitess
Last push: 2026-07-02T19:06:22+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 8, longevity 100
- inputs: {"age_days": 1937, "days_push": 62, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1115, forks 112 (observed 2026-08-28T04:03:38.406395+00:00)

## What it is
vtprotobuf is a protoc plugin (protoc-gen-go-vtproto) that generates optimized, reflection-free marshaling and unmarshaling Go code for Protocol Buffers APIv2. It runs alongside the upstream protoc-gen-go generator to produce auxiliary SizeVT, EqualVT, and MarshalVT helpers for faster serialization.

## Use cases
- generate faster protobuf marshal code in Go
- speed up gRPC serialization without reflection
- reduce allocations when marshaling protobuf messages
- replace gogo/protobuf with an APIv2-compatible codegen
- generate unrolled Size and Equal helpers for proto messages
- marshal protobuf messages into pooled buffers

## When to choose
- you use protobuf APIv2 in Go and serialization is a performance bottleneck
- you want gogo/protobuf-style optimized codegen maintained for APIv2
- you need zero-allocation marshaling or buffer pooling for proto messages

## When to avoid
- your protobuf workloads are not performance-sensitive and standard protoc-gen-go suffices
- you are not using Go or protobuf APIv2
- you need a full protobuf runtime rather than a codegen helper

## Facets
- artifact type: cli-tool
- maturity: active
- function: serialization, compiler
- domain: developer-tools, apis, backend
- platform: go, cli, cross-platform
- tags: protobuf, grpc, codegen, protoc-plugin, performance, code-generation

## Member repositories
- planetscale/vtprotobuf (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.406395+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:42:11.668922+00:00, confidence not recorded.
  - readme: https://github.com/planetscale/vtprotobuf (fetched 2026-08-28T04:03:38.406395+00:00, sha e18b98e83507)
- Data as of 2026-08-30T08:39:29.467469+00:00.
