emscripten-core / emscripten-core/emscripten
ASYNCIFY and INCOMING_MODULE_JS_API
- Lingua principale
- C++
- Stelle
- 27.6k
- Fork
- 3.6k
- Merge medio
- 1g 14h
- PR unite (30g)
- 125
Descrizione
I noticed that if I use `ASYNCIFY` and `INCOMING_MODULE_JS_API` together, then I must include `noExitRuntime` in the `INCOMING_MODULE_JS_API` list even if I don't actually provide it in the `Module`, otherwise Asyncify won't work. Apparently this has to do with this part of the code:
https://github.com/emscripten-core/emscripten/blob/9ac0425b20d0c1befb54e61d334b245bdb97c0e0/src/library.js#L3012-L3019
Which implies that if `noExitRuntime` is not included in the list, `keepRuntimeAlive()` will always return `false` so Asyncify is impossible. But why would I add it to the list if I don't intend to provide it? This seems like a bug to me.
**Version of emscripten/emsdk:**
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.59 (0e4c5994eb5b8defd38367a416d0703fd506ad81)
clang version 19.0.0git (https:/github.com/llvm/llvm-project df762a1643bb5b0b3c907611d118c82d4b68a39d)
Target: wasm32-unknown-emscripten
Thread model: posix
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Partite dalle righe 3012-3019 di src/library.js e riproducete l’interazione segnalata tra ASYNCIFY e INCOMING_MODULE_JS_API utilizzando la versione di Emscripten indicata. Tracciate il modo in cui keepRuntimeAlive() gestisce una voce noExitRuntime omessa, quindi verificate che Asyncify funzioni senza richiedere che venga elencata una proprietà inutilizzata di Module.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, wasm
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100