Import attribute for controlling builtins compilation option

Abierto
#99 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
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, wasm
Área
compilers

Línea de trabajo

Start with the discussion in pull request #95 linked from the issue, focusing on the proposed wasmBuiltins import attribute and compilation-sharing behavior. Define the attribute's handling of all, none, and builtin lists, including sorting and canonicalization; done means the proposal specifies the exact name, accepted values, defaults, and when module records and binary compilations are shared.

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

Descripción

Follow-on from https://github.com/WebAssembly/esm-integration/pull/95#issuecomment-2651870948 to track support for a new import attribute to support builtins compilation options.

From that discussion:

Add an import attribute for the wasm builtin collections to enable: either 'all', 'none', or a list of specific ones to enable. The default if not specified would be 'all' (as opposed to the JS-API which defaults to 'none').

The exact name can be confirmed, but for now consider we had an attribute called wasmBuiltins:

import source mod1 from './mod.wasm' with { wasmBuiltins: 'none' };
import source mod2 from './mod.wasm' with { wasmBuiltins: 'js-string,another-builtin' };

Ideally we would define canonicalization of the import attribute string to ensure that we do not end up treating:

import source mod1 from './mod.wasm' with { wasmBuiltins: 'all' };
import source mod2 from './mod.wasm' with { wasmBuiltins: 'js-string' };
import source mod3 from './mod.wasm';

As three separate binary compilations, but that the compilation and module record is shared between all of the above.

One issue with canonicalization when it comes to supporting multiple builtins (say comma-separated - wasmBuiltins: 'js-string,another-builtin' is that this also implies some kind of sorting canonicalization.

I think these cases should be possible to address though.

Lenguaje dominante
WebAssembly
Estrellas
458
Forks
40
Merge medio
10 d 37 min
PR fusionados (30 d)
1

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/esm-integration

Todos los issues de WebAssembly/esm-integration

Issues similares

Más issues de Compilers

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.