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

feat: Make async_trait optional #1687

Closed
wants to merge 1 commit into from
Closed

Conversation

AaronDewes
Copy link

@AaronDewes AaronDewes commented Apr 20, 2024

Motivation

Using async fn in traits has been stabilized in recent Rust version. Because of this, the dependency on async_trait is no longer necessary with recent Rust versions. Removing unneeded dependencies can reduce compile times and help reduce the risk of supply chain attacks.

Solution

This implements a feature async_trait for tonic and tonic_build. To avoid breaking any existing things, this feature is enabled by default.

async fn in traits has been stabilized in recent Rust version. This implements a feature async_trait for tonic and tonic_build (enabled by default).
@AaronDewes AaronDewes marked this pull request as draft April 20, 2024 20:14
@matze
Copy link
Contributor

matze commented Apr 23, 2024

Doesn't this require #1556 in case that feature is disabled?

@AaronDewes
Copy link
Author

Yes, you're right, I also noticed that while trying, that's why it's a draft. I'll have a look at integrating these changes soon.

@AaronDewes AaronDewes closed this Apr 24, 2024
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 this pull request may close these issues.

2 participants