Add proc macro for converting async traits to return StackFutures
还没有人认领这个 Issue。
评估
调研方向
首先检查现有的 StackFuture API,以及 issue 中引用的 async_trait crate 行为。明确 proc macro 应如何展开 trait 声明和 impl,包括所需的 lifetime 注解;完成的标准是两种形式都能生成返回具有所请求容量的 StackFuture 的可用方法。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 314
- 派生
- 17
- 平均合并
- 11 小时 50 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/stackfuture 的其他 Issue
-
Add benchmarks 未关闭
难度 4/5 3-5 天 新手友好度 35/100
microsoft/stackfuture#8 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 35/100
microsoft/stackfuture#6 · 5 条评论 ·
查看 microsoft/stackfuture 的全部 Issue
相似的 Issue
-
type/bug
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 82/100
registrystack/registry-stack#1239 ·
-
risk:low runtime status:in-progress type:test
难度 1/5 1 小时以内 新手友好度 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 84/100
EricSpencer00/Resilient#4835 · 1 条评论 ·