microsoft / microsoft/stackfuture
Add proc macro for converting async traits to return StackFutures
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 314
- Forks
- 17
- Avg merge
- 11h 50m
- Merged PRs (30d)
- 1
Description
The idea here is to make a macro similar to the #[async_trait] one from the async trait crate. Using it would look something like this:
#[stackfuture::async_trait(4096)]
trait Foo {
async fn bar(&self) -> i32;
}
The macro would then expand to something like (along with whatever lifetime annotations are needed:
trait Foo {
fn bar(&self) -> StackFuture<i32, { 4096 }>`;
}
We'd do a similar thing for impls as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing StackFuture API and the async_trait crate behavior referenced in the issue. Define how the proc macro should expand both trait declarations and impls, including required lifetime annotations; done means both forms produce working StackFuture-returning methods with the requested capacity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100