Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Using wstd from another event loop on WASI 0.2, without block_on

オープン
#166 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
rust, wasm

調査の方向性

Start by reproducing the panic when wstd futures are created or polled from GPUI tasks during the exported tick function, using the embedded_gpui and wasm32-wasip2 context described here. Read wstd's runtime and reactor integration alongside GPUI's executor; done would require an agreed, supported way to use http::Client, net::TcpListener, or timers without blocking block_on.

索引モデルが issue の本文から書いたものです。

説明

We run GPUI (Zed's UI framework) inside a wasm32-wasip2 component, through embedded_gpui. The host drives the component by calling an exported tick function repeatedly. Each call runs GPUI's executor until it is idle and must return promptly: the plugin's UI has to keep responding, and the host enforces a time budget per call.

Plugin code, running as GPUI tasks, wants to await wstd's I/O: http::Client, net::TcpListener, timers.

Outside block_on this panics as soon as a wstd future is created or
polled:

Reactor::current must be called within a wstd runtime

block_on isn't usable here. It holds the thread until the future completes, so the UI freezes for the whole request, and the call can outlive the host's time budget. Long waits, such as an OAuth redirect listener waiting for the user to finish signing in in their browser, can't be done at all.

So there is no way to use wstd from a component whose thread belongs to another event loop. Is there a supported way to do this, or would you be open to adding one?

主要言語
Rust
スター
136
フォーク
21
平均マージ
5日 6時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bytecodealliance/wstd のほかの issue

bytecodealliance/wstd の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。