Support service per crate

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

Nobody has claimed this yet.

Assessment

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

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.

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.

Dominant language
Rust
Stars
544
Forks
77
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from connectrpc/connect-rust

All issues in connectrpc/connect-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.