connectrpc / connectrpc/connect-rust

Support service per crate

Open
#145 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
509
Forks
66
Avg merge
2d 8h
Merged PRs (30d)
10

Description

It would be great to support generating one crate per service to improve incremental compilation performance in Rust workspaces.

For example:

serviceA.proto → crates/services/service-a
serviceB.proto → crates/services/service-b

Currently, generated code relies on relative imports such as super::.. With a per-service crate layout, these imports could instead reference external crates directly (for example service_b::...).

This would provide a major benefit for larger projects with many services: changes to a single .proto file would only require recompiling the corresponding crate instead of triggering recompilation across all generated services.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the current generator lays out services and produces relative imports, then inspect the workspace and crate-generation entry points. Define the per-service crate layout and import behavior for multiple .proto files, and verify that changing one service can be built without recompiling the others.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.