Add community/anthropics-buffa plugin v0.2.0#2333
Draft
iainmcgin wants to merge 1 commit intobufbuild:mainfrom
Draft
Add community/anthropics-buffa plugin v0.2.0#2333iainmcgin wants to merge 1 commit intobufbuild:mainfrom
iainmcgin wants to merge 1 commit intobufbuild:mainfrom
Conversation
buffa is a zero-copy Rust Protobuf implementation with editions support (2023/2024), no_std compatibility, and view types for borrowed field access. Passes the protobuf conformance suite (5539 binary+JSON tests). The plugin emits one .rs file per proto file using a flat naming convention (`foo/v1/bar.proto` -> `foo.v1.bar.rs`), matching what BSR expects. Module tree assembly is a separate `protoc-gen-buffa-packaging` plugin in the same repo, not needed for BSR (which synthesizes lib.rs server-side). Crates: https://crates.io/crates/protoc-gen-buffa Repo: https://github.com/anthropics/buffa
This was referenced Mar 17, 2026
Member
|
I think we might want to make a top-level anthropics org for this, instead of under community - also re: connect-rust. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
protoc-gen-buffaplugin for Rust protobuf code generation.About buffa
buffa is a zero-copy Rust Protobuf implementation with:
&str/&[u8]field access without owned allocationCrates are on crates.io:
buffa,buffa-types,protoc-gen-buffa.Output convention
The plugin emits one
.rsfile per proto file with a flat naming scheme:foo/v1/bar.proto->foo.v1.bar.rs. No subdirectories, no mod.rs - module tree assembly is a separate local-only packaging plugin (protoc-gen-buffa-packaging) that BSR does not need since it synthesizes lib.rs server-side.Open questions for review
community/anthropics-buffafollowing theneoeinstein-prostpattern. Happy to move if there is a preferred location.json=trueandviews=true. If BSR has conventions for which opts to expose vs bake in, please advise.pkg.subpkg.file.rs) is flat but per-proto-file, not per-package like prost. If BSR's lib.rs synthesis expects per-package naming instead, we can add a plugin option to switch modes.Process note
CONTRIBUTING.md asks for an issue first - happy to open one if you would prefer to discuss before reviewing the PR. Filed this as a draft in the meantime.
Related: #2334 (connectrpc/rust) declares this plugin as a dep, so this one would need to land first.