tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Introduce a build option to not add `#[async_trait]` on generated service.

Open vriesk opened this issue 11 months ago • 0 comments

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.

vriesk avatar Mar 06 '24 10:03 vriesk