Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Embedding API changes

Abierto
#77 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
wasm
Área
compilers

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
WebAssembly
Estrellas
216
Forks
19
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WebAssembly/stack-switching

Todos los issues de WebAssembly/stack-switching

Issues similares

Más issues de Compilers

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.