tonic
tonic copied to clipboard
Introduce a build option to not add `#[async_trait]` on generated service.
Feature Request
Crates
tonic_build
Motivation
When the user does not need object safety (not yet supported by the mainline compiler), #[async_trait]
on the generated service is not necessary. Not having it avoids its quirks messing up with other macros.
Proposal
Add a generate_async_trait(bool)
method to ::tonic_build::Builder
.
Alternatives
This is the way of the future.