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

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

Open
vriesk opened this issue Mar 6, 2024 · 0 comments · May be fixed by #1697
Open

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

vriesk opened this issue Mar 6, 2024 · 0 comments · May be fixed by #1697

Comments

@vriesk
Copy link

vriesk commented Mar 6, 2024

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.

@jun-sheaf jun-sheaf linked a pull request May 9, 2024 that will close this issue
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