Using wstd from another event loop on WASI 0.2, without block_on
Les mainteneurs répondent en général sous 5 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- Active
- Stack technique
- rust, wasm
- Domaine
- backend, operating-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- Rust
- Étoiles
- 136
- Forks
- 21
- Merge moyen
- 5 j 6 h
- PR mergées (30 j)
- 11
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de bytecodealliance/wstd
-
Implement `http` on WASIp3Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
bytecodealliance/wstd#164 ·
Les mainteneurs répondent en général sous 5 jours
-
Implement `net` on WASIp3Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
bytecodealliance/wstd#161 ·
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 55/100
bytecodealliance/wstd#151 ·
Les mainteneurs répondent en général sous 5 jours
-
Tracking issue for WASIp3Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 32/100
bytecodealliance/wstd#141 · 6 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 5 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
bytecodealliance/wstd#109 ·
Les mainteneurs répondent en général sous 5 jours
Toutes les issues de bytecodealliance/wstd
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
Devolutions/picky-rs#546 · 1 commentaire ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
zcashlabs/thus-spoke-zakura#153 ·
Les mainteneurs répondent en général sous 1 jour
-
claude_code: step fails on session-scoped (`@inline`) plugins with `Invalid scope "session"`Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
topgrade-rs/topgrade#2395 ·
Les mainteneurs répondent en général sous 1 jour