- Category
- Developer Tools
- Rank
- No. 728Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- anthropics
- GitHub
- 879 stars
- Latest release
- v0.9.2
- Date
About
Anthropic's Rust implementation of protobuf with editions support, JSON serialization, and zero-copy views.
What it does
Buffa turns Protocol Buffer schemas into Rust message types for encoding and decoding structured data. Generated messages come in owned and borrowed forms, while optional features add canonical JSON, readable text encoding, and schema-driven reflection.
Why it's ranked here
The case rests on unusually broad protocol coverage and thoughtful Rust representations. The project reports full conformance across binary, JSON, and text formats, preserves unknown data, and supports constrained environments. Pre-release API stability and missing service generation temper that strength.
What's good
Borrowed message views can read strings and bytes without allocating. Owned views retain that behavior across asynchronous boundaries. Cached encoded sizes keep serialization linear through deeply nested messages. Typed open enums preserve unknown numeric values, and unknown fields survive decode and re-encode cycles.
Tradeoffs
Buffa remains pre-release, so breaking changes arrive through minor releases. It generates types from schemas rather than offering a general message derive. Service generation is not supported. Proto2 optional fields lack generated getters that apply custom defaults, and constrained builds receive fewer scoped JSON parsing controls.
How to use it well
Choose it for Rust systems that own Protocol Buffer schemas and value editions, wire compatibility, borrowed reads, or constrained runtime support. Use the hosted Buf generator for simple builds, or the build helper when generation belongs in Cargo. Bring separate tooling for RPC service generation.
Technical notes+
Cargo.toml defines a Rust 2021 workspace containing the runtime, well-known types, descriptors, codegen, build integration, derive support, YAML support, tests, and two protoc plugins. docs/guide.md documents Buf remote generation and buffa-build::Config, with feature flags for std, json, text, arbitrary, and reflection. buffa-test/build.rs exercises generated code across vtable reflection, custom containers, views, JSON, text, fuzz derives, recursion, oneofs, and naming collisions. fuzz/build.rs generates proto2 and proto3 fuzz targets but disables views for recursive conformance messages. docs/migration-from-prost.md explicitly records the absent service_generator and derive surfaces.
Observed
- License
- Apache-2.0
- Primary language
- Rust
- Packaging
- Cargo workspace with separately packaged runtime, type, descriptor, codegen, build, YAML, and plugin crates
- Install surface
- Cargo dependencies for libraries, optional Homebrew plugin binaries, and a hosted Buf remote plugin
- Interfaces
- Rust libraries, build-time code generation helper, protoc plugin binaries, and Buf remote generation
- Platform support
- Core runtime supports no_std with alloc; std adds I/O, time conversions, and thread-local JSON options
- Validation structure
- A dedicated buffa-test workspace crate and separate fuzz build configuration are present
Read from README.md, Cargo.toml, docs/guide.md, docs/migration-from-prost.md, docs/migration-from-protobuf.md, docs/investigations/reflection.md, docs/investigations/reflection-vtable.md, docs/investigations/e0477-owned-view-send/README.md, fuzz/build.rs, buffa-test/build.rs.
What it can do
Parse Protocol Buffer messages
Protocol Buffer binary data → Structured data objects
Serialize data to Protocol Buffer format
Structured data objects → Protocol Buffer binary data
Convert Protocol Buffer data to JSON
Protocol Buffer messages → JSON formatted data
Convert JSON to Protocol Buffer format
JSON formatted data → Protocol Buffer messages
Create zero-copy views of Protocol Buffer data
Protocol Buffer binary data → Memory-efficient data views
Process Protocol Buffer editions schemas
Protocol Buffer definition files with editions → Validated schema objects
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
