Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tonic provides no way to disable server-only dependencies #959

Closed
djc opened this issue Apr 4, 2022 · 1 comment · Fixed by #960
Closed

tonic provides no way to disable server-only dependencies #959

djc opened this issue Apr 4, 2022 · 1 comment · Fixed by #960

Comments

@djc
Copy link
Contributor

djc commented Apr 4, 2022

If you pull in tonic 0.7 as a dependency, the transport feature (which is enabled by default) pulls in the axum dependency. It appears only servers need the axum dependency, so for downstream users who only need client code, this is unnecessary.

@djc
Copy link
Contributor Author

djc commented Apr 25, 2022

I finally tried using #960 and I don't think it's an adequate fix. First of all, the tls feature still pulls in transport, so by default if you pull in tls or one of the features that depend on it, you'll still get the server-side dependencies. That part can actually be worked around by depending on the other required features directly, but then I noticed that the entire tonic::transport module is unavailable if the transport feature is disabled, so I don't have access to things like Error, Channel or Endpoint from that module.

Should I submit a PR replacing the use of transport internally with channel for client-side or both-side items?

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 a pull request may close this issue.

1 participant