googleapis / googleapis/librarian

rust: support auto-generating bidirectional gRPC streaming for Rust GAPIC clients

Open
#6,835 0 comments 0 reactions 1 assignee Claimed by @suzmue View on GitHub
Dominant language
Go
Stars
45
Forks
62
Avg merge
18h 32m
Merged PRs (30d)
175

Description

## Context & Goal
Currently, the Rust generator in `librarian` skips gRPC streaming methods when generating GAPIC client libraries. To support high-throughput bidirectional streaming APIs (such as Speech-to-Text v2 `StreamingRecognize` and Dialogflow v2 `StreamingDetectIntent`), `librarian` needs to support auto-generating bidirectional (`BidiStreaming`) gRPC client methods, stubs, and transport dispatchers.

This issue tracks the generator implementation required in `librarian` to support bidirectional gRPC streaming for Rust GAPIC clients.

## Proposed Design & Approach

- Keep all experimental streaming code generation **off by default** using a dedicated configuration option (`include_bidi_streaming_methods: true` in `librarian.yaml`).
- Automatically generate internal, private (`pub(crate)`) raw Prost structs (`src/prost.rs` and `src/prost/`) and local `ToProto` / `FromProto` conversion trait implementations (`src/convert.rs`) inside target crates to prevent raw `prost` types from leaking into public client library APIs. This builds on the existing prost and convert_prost templates, but needs to be dynamically generated when streaming types are detected.
- Generate bidirectional streaming method signatures on service stubs, builders, and client transports using GAX stream wrapper types.

## Related Issues
- `google-cloud-rust` umbrella issue: https://github.com/googleapis/google-cloud-rust/issues/2318

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.