Import attribute for controlling builtins compilation option

Aperta
#99 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
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, wasm
Ambito
compilers

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
WebAssembly
Stelle
458
Fork
40
Merge medio
10g 37m
PR unite (30g)
1

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

Tutte le issue di WebAssembly/esm-integration

Issue simili

Altre issue su Compilers

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.