Open
Conversation
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. |
Author
Sure thing I'll redraft as part of updating to the new versions I'll likely release next week. |
c42c7b7 to
507d069
Compare
507d069 to
2f986f3
Compare
bufdev
reviewed
Apr 2, 2026
| @@ -0,0 +1,4 @@ | |||
| source: | |||
Member
There was a problem hiding this comment.
I think there's supposed to be a crates section here? See the prost plugin as an ezample
Author
There was a problem hiding this comment.
changed to crate ref instead of github ref 👍
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`). Module tree assembly is a separate `protoc-gen-buffa-packaging` plugin in the same repo, registered separately. Crates: https://crates.io/crates/protoc-gen-buffa Repo: https://github.com/anthropics/buffa
2f986f3 to
8f27d26
Compare
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, under the new top-levelanthropicsorg as requested in earlier review.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 packaging plugin (protoc-gen-buffa-packaging, submitted separately).Open questions for review
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 (anthropics/connect-rust) declares this plugin as a dep, so this one would need to land first.