connectrpc-build: option to generate client code only
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design, build-system
Research direction
Start by tracing how Config::gate_client_feature is passed into code generation and how the plugin handles its existing option. Then locate the generator paths for service traits, ServiceExt, server types, dispatch, and clients; the payload does not name their files or tests. Done means generate_server(false) (and plugin option no_server) emits the requested client-side code without server code, while the default keeps server generation enabled.
Written by the indexing model from the issue text.
Description
A crate that only calls a service still gets the server trait, …ServiceExt, …Server<T> and their dispatch generated, and must compile them. That costs build time and code size, and server-side name clashes (#309; RPCs named like clone/into/as_ref) break crates that never implement the service.
Minimal proto:
syntax = "proto3";
package demo.v1;
message Req {}
message Resp {}
service DemoService {
rpc Register(Req) returns (Resp);
}
connectrpc_build::Config::new().files(&["demo.proto"]).includes(&["."]).gate_client_feature(true).compile() then include! of the output fails with E0061 in the generated dispatch, though only DemoServiceClient is used.
Proposal: Config::generate_server(bool) (plugin option no_server), default true. When false, emit messages, views, Encodable impls where needed, and FooClient<T> only. This mirrors gate_client_feature, which already exists for the opposite direction.
- Dominant language
- Rust
- Stars
- 544
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from connectrpc/connect-rust
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
connectrpc/connect-rust#358 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 53/100
connectrpc/connect-rust#355 ·
-
Streaming request body errors are always reported as `internal`Possibly taken @AhmedElBanna80 claimed this 18 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
connectrpc/connect-rust#352 ·
-
Difficulty 3/5 Half a day Newbie friendliness 48/100
connectrpc/connect-rust#349 ·
-
Client fails 12 cases of connectconformance v1.0.7 (gRPC-Web bidi metadata, gRPC truncated server-stream message)Possibly taken @excavador claimed this 34 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
connectrpc/connect-rust#346 · 1 comment ·
All issues in connectrpc/connect-rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Choochmeque/tauri-plugin-webdriver#134 ·
Maintainers usually reply within 17 days
-
bug rust SDK & CLI & REST API
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
boxlite-ai/boxlite#3292 ·
Maintainers usually reply within 1 day
-
Android bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anefzaoui/misterdownloadmanager#2516 ·
Maintainers usually reply within 1 day
-
editor ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
state:triage tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 89/100
agent8-cash/ethpayserver#731 ·
Maintainers usually reply within 1 day