Open jun-sheaf opened 2 months ago
@LucioFranco Note that the current CI doesn't test all feature combinations. We should use cargo hack --feature-powerset test
to ensure all features are covered.
I think we need to generate the code as fn foo() -> impl Future + Send
to allow sendable futures. We also need to check if the generated functions will work with the Arc since that also needs Sync. I would like to move in this direction but I don't feel like there is a huge rush. I would like to see some more tests as well checking all the permutations of sendiness/syncness so that we know this will work for users.
Motivation
async_trait
is not necessary for most use-cases. This PR provides the option for users.Solution
Providing an option to generate async traits without
async_trait
.Fixed: https://github.com/hyperium/tonic/issues/1651