Skip to content

feat: add public grpc feature flag for hybrid clients (#6095)#6098

Open
mahendrarathore1742 wants to merge 2 commits into
googleapis:mainfrom
mahendrarathore1742:feat/grpc-feature-flag
Open

feat: add public grpc feature flag for hybrid clients (#6095)#6098
mahendrarathore1742 wants to merge 2 commits into
googleapis:mainfrom
mahendrarathore1742:feat/grpc-feature-flag

Conversation

@mahendrarathore1742

Copy link
Copy Markdown
  • Add public feature flag to gax and gax-internal crates
  • Gate gax streaming module under #[cfg(all(feature = grpc, google_cloud_unstable_gapic_streaming))]
  • Update docs.rs metadata to include grpc feature
  • Add cfg(google_cloud_unstable_grpc) to workspace check-cfg

fix #6095

- Add public  feature flag to gax and gax-internal crates
- Gate gax streaming module under #[cfg(all(feature = grpc, google_cloud_unstable_gapic_streaming))]
- Update docs.rs metadata to include grpc feature
- Add cfg(google_cloud_unstable_grpc) to workspace check-cfg
@mahendrarathore1742
mahendrarathore1742 requested a review from a team as a code owner July 18, 2026 08:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new grpc feature flag across the gax and gax-internal crates to gate gRPC transport and streaming capabilities, updating documentation metadata and conditional compilation attributes accordingly. Feedback suggests ensuring that enabling the grpc feature in google-cloud-gax-internal also propagates and enables the grpc feature in google-cloud-gax to prevent potential compilation or missing functionality issues.

Comment thread src/gax-internal/Cargo.toml Outdated
_default-rustls-provider = ["google-cloud-auth?/default-rustls-provider", "tonic?/tls-aws-lc"]
# Enable gRPC transport support. This is a public feature flag that enables
# gRPC streaming capabilities in client libraries.
grpc = ["_internal-grpc-client"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

When the grpc feature is enabled in google-cloud-gax-internal, it should also enable the corresponding grpc feature in google-cloud-gax. Otherwise, the streaming module in google-cloud-gax (which is gated by feature = "grpc") will not be compiled, leading to compilation errors or missing functionality when gRPC streaming is expected.

Suggested change
grpc = ["_internal-grpc-client"]
grpc = ["_internal-grpc-client", "google-cloud-gax/grpc"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Cargo feature flag for hybrid clients to enable grpc transport

1 participant