Feature Request
Add ability to specify path to tonic and async_trait imports when referenced in codegen.
Crates
tonic-build
Motivation
I keep tonic and many other dependencies in a separate package. When I import them into a package that uses tonic-build to generate Rust proto, I get an error saying tonic and async_trait cannot be found.
Currently, the only way to use tonic is a direct dependency of the main package not as an import from another package. I haven't come across this issue with other packages. Serde has "crate" container attribute that solves theirs.
Proposal
Add a new method to the tonic_build::configure() -> Config Builder trait.
Alternatives
The alternative way is I clone the repo and hardcode the correct import path.
Feature Request
Add ability to specify path to
tonicandasync_traitimports when referenced in codegen.Crates
tonic-buildMotivation
I keep
tonicand many other dependencies in a separate package. When I import them into a package that usestonic-buildto generate Rust proto, I get an error sayingtonicandasync_traitcannot be found.Currently, the only way to use
tonicis a direct dependency of the main package not as an import from another package. I haven't come across this issue with other packages. Serde has "crate" container attribute that solves theirs.Proposal
Add a new method to the
tonic_build::configure() -> Config Buildertrait.Alternatives
The alternative way is I clone the repo and hardcode the correct import path.