What happens when an async function is imported?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, wasm
- Ambito
- web-dev
Direzione di ricerca
Start with the function import example in main.wat and counter.js, where getCount is changed to an async function. Read the linked WebAssembly JavaScript Promise Integration proposal and the existing issue discussion to determine whether async imports should be supported or rejected more clearly. Done means the expected runtime behavior and relationship to that proposal are decided.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
For example, if we modify the function import example and make getCount async.
;; main.wat --> main.wasm
(module
(import "./counter.js" "getCount" (func $getCount (func (result i32))))
)
// counter.js
async function getCount() {
const response = await fetch('//api/get-count');
...
return count;
}
export {getCount};
Given existing behaviour, it would crash at runtime. But should we do better?
Should this rely on or interact with https://github.com/WebAssembly/js-promise-integration?
- Lingua principale
- WebAssembly
- Stelle
- 458
- Fork
- 40
- Merge medio
- 10g 37m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WebAssembly/esm-integration
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
WebAssembly/esm-integration#122 ·
-
Supporting WebAssembly.JSTag importForse già presa @guybedford l’ha presa 190 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WebAssembly/esm-integration#120 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
WebAssembly/esm-integration#119 ·
-
String Constants BikeshedAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WebAssembly/esm-integration#118 · 10 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WebAssembly/esm-integration#112 · 9 commenti ·
Tutte le issue di WebAssembly/esm-integration
Issue simili
-
specification
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WICG/webmonetization#819 · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 1 giorno
-
🛠️ dette technique
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
betagouv/mon-entreprise#4752 · 1 commento ·
I maintainer di solito rispondono entro 5 giorni
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
franciscoBSalgueiro/en-croissant#1111 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
inmanta/web-console#7947 ·
I maintainer di solito rispondono entro 1 giorno