Add anthropics/connect-rust plugin v0.3.2#2334
Open
iainmcgin wants to merge 1 commit intobufbuild:mainfrom
Open
Add anthropics/connect-rust plugin v0.3.2#2334iainmcgin wants to merge 1 commit intobufbuild:mainfrom
iainmcgin wants to merge 1 commit intobufbuild:mainfrom
Conversation
This was referenced Mar 17, 2026
Member
61b03f3 to
eca199a
Compare
eca199a to
f42cc7a
Compare
f42cc7a to
92259e7
Compare
Author
|
changed to crate ref instead of github ref 👍 |
92259e7 to
314f1da
Compare
connect-rust is a Tower-based Rust implementation of the ConnectRPC protocol. The plugin emits service stubs (server traits, typed clients, monomorphic dispatchers) for the Connect, gRPC, and gRPC-Web protocols from a single service implementation. Passes the full ConnectRPC conformance suite. Generated stubs reference message types via absolute Rust paths into the buffa SDK crate (declared as a plugin dep). The plugin accepts `extern_path=.=<rust_path>` (or shorthand `buffa_module=<rust_path>`) to point at the buffa SDK location, same format as tonic/prost. Crates: https://crates.io/crates/connectrpc-codegen Repo: https://github.com/anthropics/connect-rust
314f1da to
b60cff4
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-connect-rustplugin for ConnectRPC Rust service bindings, under the new top-levelanthropicsorg as requested in earlier review.About connect-rust
connect-rust is a Tower-based Rust implementation of the ConnectRPC protocol:
request.nameis a&strborrow into the decoded bufferCrates on crates.io:
connectrpc,connectrpc-codegen,connectrpc-build.Plugin layering
The plugin emits service stubs only - server traits, typed clients, monomorphic dispatchers. Message types come from
buf.build/anthropics/buffa(declared indeps:). Generated stubs reference message types via absolute Rust paths (crate::<buffa_sdk>::pkg::Type).Dockerfile note: the
protoc-gen-connect-rustbinary is a[[bin]]target inside theconnectrpc-codegencrate, socargo install connectrpc-codegenis what produces it.Open question: extern_path injection
The plugin needs to know where the buffa SDK crate lives to emit the right paths. It accepts either
extern_path=.=<rust_path>(same format as tonic/prost) or the shorthandbuffa_module=<rust_path>.I left
opts: []with a comment in the yaml because I assume BSR injectsextern_path=.=::<buffa_sdk_crate_name>at invocation time based on thedeps:config - same as it does for tonic referencing prost types. Would appreciate confirmation of the exact value BSR injects so I can verify the plugin handles it correctly.Dependencies
Depends on the buffa plugin landing first: #2333
Process note
CONTRIBUTING.md asks for an issue first - happy to open one if you would prefer to discuss before reviewing. Filed as draft.