Worker imports & memory sharing
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
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, wasm
- Área
- web-dev
Línea de trabajo
Start by reading the linked discussion in issue 14 and the ESM Phase Imports proposal in pull request 106, then compare the worker and dynamic import scenarios described here. Determine whether passing imports to new Worker() should be specified and how that interacts with module import resolution. Done means a concrete, agreed proposal or specification change with its ergonomics and compatibility implications resolved.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
As brought up in https://github.com/WebAssembly/esm-integration/issues/14#issuecomment-2931717336, one problem with the ESM integration instance import model is that for multi-threading scenarios the memory import needs to be available at startup.
The ESM Phase Imports proposal also enables the ability for new Worker(wasmModule) to create a worker from a WebAssembly module which is currently specified in https://github.com/WebAssembly/esm-integration/pull/106.
Delaying instantiation via dynamic import provides one route, but it might be worth considering the ergonomics more carefully here.
One idea might be to allow passing module imports to the new Worker() constructor when using the new source form:
import source mod from './mod.wasm';
const memory = new WebAssembly.Memory(...);
const worker = new Worker(source, {
imports: {
'memory': memory
}
});
Normally for dynamic import() this sort of resolution override is dangerous due to mismatch with existing imports, but as the creator of the module environment it could be framed as a sort of top-level-only import map, so that setting imports for context creation can certainly work actually.
@sbc100 let me know if I'm summarizing the issue correctly or missing anything here too.
- Lenguaje dominante
- WebAssembly
- Estrellas
- 458
- Forks
- 40
- Merge medio
- 10 d 37 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/esm-integration
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
WebAssembly/esm-integration#122 ·
-
Supporting WebAssembly.JSTag importPosiblemente ocupada @guybedford la tomó hace 190 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WebAssembly/esm-integration#120 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WebAssembly/esm-integration#119 ·
-
String Constants BikeshedAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
WebAssembly/esm-integration#118 · 10 comentarios ·
-
Bundler test suiteAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
WebAssembly/esm-integration#109 · 1 comentario ·
Todos los issues de WebAssembly/esm-integration
Issues similares
-
specification
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
WICG/webmonetization#819 · 1 reacción ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
db-ux-design-system/core-web#8856 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
🛠️ dette technique
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
betagouv/mon-entreprise#4752 · 1 comentario ·
Los mantenedores suelen responder en 5 días