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

RFC: removal of JSRuntime

Abierto
#421 9 comentarios 11 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
c
Área
compilers

Línea de trabajo

No files or tests are named. Start by mapping the JSRuntime and JSContext declarations, their lifecycle functions, and all APIs with an RT suffix; then review how a current realm could be represented. Done would require an agreed API design, consistent implementation across the engine, and a defined backward-compatibility strategy.

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

Descripción

The existence of JSRuntime and JSContext complicates the QuickJS API because many functions are duplicated and sometimes it is not clear whether a JSRuntime or JSContext parameter is required. The rationale is that JSContext represent the JS Realm and JSRuntime the whole JS execution content. In many applications, having more than one Realm is not needed. Even when several realms are needed, it should be enough to have a current realm stored in the execution context and an API to change it.

So I propose to remove the JSRuntime type and to add a new JSRealm type. JSContext would become the JS execution context. New functions would be added to change the current realm and to create or destroy a realm. All the functions with a RT suffix would be removed.

If necessary, backward compatibility could be mostly kept by setting JSRuntime = JSContext and by redirecting the functions with a RT suffix to the corresponding functions without a RT suffix.

Lenguaje dominante
C
Estrellas
11.1k
Forks
1.2k
Merge medio
11 h 20 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 bellard/quickjs

Todos los issues de bellard/quickjs

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.