microsoft / microsoft/stackfuture
Add proc macro for converting async traits to return StackFutures
オープン
まだ誰も着手していません。
enhancement
- 主要言語
- Rust
- スター
- 314
- フォーク
- 17
- 平均マージ
- 11時間 50分
- マージ済み PR(30日)
- 1
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の StackFuture API と、issue で参照されている async_trait crate の動作を確認します。必要な lifetime アノテーションを含め、proc macro が trait 宣言と impl の両方をどのように展開すべきかを定義します。完了条件は、どちらの形式でも、要求された容量の StackFuture を返す動作するメソッドが生成されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100