Buf blog

Mail iconRSS iconSlack logoX logo

Protobuf

posts

Tip of the week #9: Some numbers are more equal than others

The first 15 field numbers are special: most runtimes will decode them much faster than the other field numbers. When designing a message type for decoding performance, it’s good to use these field numbers on fields that are almost always present.
June 17, 2025

Oneofs are a disaster. Protovalidate has fixed them.

Instead of using oneofs, you can now use the new (buf.validate.message).oneof Protovalidate annotation. As long as you're validating your messages with Protovalidate, (buf.validate.message).oneof does exactly what you'd expect, with none of the pain.
June 13, 2025

Tip of the week #8: Never use required

Don’t use 'required' to modify fields—you won’t be able to get rid of it later when you realize it was a bad idea.
June 3, 2025

Tip of the week #7: Scoping it out

buf convert and protoscope are powerful tools for examining and debugging wire format dumps.
June 2, 2025

Tip of the week #6: The subtle dangers of enum aliases

Enum values are a poorly designed feature and shouldn’t be used.
May 19, 2025

Tip of the week #5: Avoid import public/weak

Avoid import public and import weak.
May 13, 2025

Tip of the week #4: Accepting mistakes we can’t fix

Protobuf’s distributed nature introduces evolution risks that make it hard to fix some types of mistakes. Sometimes the best thing to do is to just let it be.
April 29, 2025

Tip of the week #3: Enum names need prefixes

Enums inherit some unfortunate behaviors from C++. Avoid this problem by using the Buf lint rules ENUM_VALUE_PREFIX and ENUM_ZERO_VALUE_SUFFIX.
April 22, 2025

Tip of the week #2: Compress your Protos!

Compression is everywhere. This pervasiveness means that wire size tradeoffs matter less than they used to twenty years ago, when Protobuf was designed.
April 15, 2025

Tip of the week #1: Field names are forever

Don’t rename fields. Even though there are a slim number of cases you can get away with it, it’s rarely worth doing, and is a potential source of bugs.
April 8, 2025

Protobuf for Javascript: Protobuf-ES 2.0 is now generally available

Today we’re announcing the 2.0 release of the Protobuf-ES project, our fully compliant Protobuf implementation for JavaScript and TypeScript. This release introduces full support for Protobuf Editions, new APIs for field presence & default values, TypeScript typing for Protobuf’s JSON Format, a full reflection API, support for Protobuf custom options, and more convenient APIs for managing extension registries. The 2.0 release is a major version bump, and comes with breaking changes. Read on to learn what’s changed and how to migrate to the 2.0 release.
August 14, 2024

Introducing the new Buf GitHub Action

Today, we’re launching the 1.0 release of our new unified GitHub Action, powered by the Buf CLI. This integration streamlines the processes of building, formatting, linting, and checking for breaking changes in your Protobuf schemas. It seamlessly integrates with GitHub's pull request workflow and automatically publishes Protobuf schema changes to the Buf Schema Registry when pull requests are merged.
August 13, 2024

Protobuf Editions are here: don’t panic

Most Protobuf users should ignore Editions and continue using proto3. If you become an early adopter, we’ve been working closely with Google to ensure that Buf will support editions as soon as they’re generally available.
May 9, 2024

The BSR now integrates with Kong Insomnia, making gRPC even easier to use

Kong Insomnia’s 9.0 release includes integrated support for the Buf Schema Registry. Organizations adopting gRPC can now provide developers first-class GUI tools while keeping schema access simple and secure.

The real reason to use Protobuf is not performance

Fast serialization and small payloads are nice, but schema-driven development is why you’ll adopt Protobuf.
November 15, 2023

Announcing protoc-gen-validate v1.0 and our plans for v2.0

A look to the future of Protobuf validation
April 24, 2023

Ready for a trial?

Talk with an expertSign up
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Apache®, Apache Kafka®, and Kafka are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. No endorsement by The Apache Software Foundation is implied by the use of these marks.