Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Embedding API changes

Aperta
#77 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
wasm
Ambito
compilers

Direzione di ricerca

The requested work is an update to the explainer's appendix; start by reading the existing embedding API and exception-handling extension described there. Done means the appendix sketches SUSPEND, cont_resume, host-function suspensions, payload and parameter-type requirements, and the stated JS API and JSPI consequences.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

It would be good to update the explainer with a sketch of how we expect the embedding API given in the appendix to be extended.

Taking inspiration from how the embedding API is extended for exception handling, we can add a new kind of result from func_invoke, SUSPEND a, where a is a continuation address. We can also add a new function cont_resume that behaves exactly like func_invoke, except that it takes a continuation address instead of a function address. Finally, we can allow host functions to result in suspensions, just like we allow them to result in throws. The suspensions need to be able to carry payloads and need to record the types of the parameters necessary to resume the suspending continuation.

This set of changes are sufficient to allow the JS API spec to specify that an error should be thrown when calling an export results in SUSPEND a. It is also sufficient to specify JSPI in terms of core stack switching by having JSPI suspending import wrappers return suspensions to Wasm carrying the suspending promises as payloads and having JSPI promising export wrappers call func_invoke, receive SUSPEND a, then schedule the future resumption of the continuation via cont_resume once the extracted suspending promise is resolved.

Lingua principale
WebAssembly
Stelle
216
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebAssembly/stack-switching

Tutte le issue di WebAssembly/stack-switching

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.