Compile JavaScript to WASM with no networking involved - just reading STDIN and writing to STDOUT
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, wasm
Línea de trabajo
Empieza leyendo la documentación de StarlingMonkey y los puntos de entrada de starling.wasm y starling-raw.wasm; después, sigue cómo se exponen WIT y la entrada/salida estándar. Se considera terminado cuando estén documentadas las interfaces de I/O implementadas, el WIT mínimo y una ruta de compilación sin red para JavaScript genérico; el issue no menciona pruebas ni archivos fuente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I've built Native Messaging hosts using several JavaScript to WASM toolchains, or just executed the WASM inside of the JavaScript engine compiled to WASM in the case of QuickJS.
Here's the protocol and documentation published by Chrome, MDN, Edge, Opera, Safari https://github.com/guest271314/NativeMessagingHosts#native-messaging-documentation. In pertinent part
Chrome starts each native messaging host in a separate process and communicates with it using standard input (stdin) and standard output (stdout). The same format is used to send messages in both directions; each message is serialized using JSON, UTF-8 encoded and is preceded with 32-bit message length in native byte order. The maximum size of a single message from the native messaging host is 1 MB, mainly to protect Chrome from misbehaving native applications. The maximum size of the message sent to the native messaging host is 64 MiB.
Note, that the IPC communication is not a TTY.
Several examples of JavaScript compiled to WASM and/or embedded and executed within a JavaScript engine compiled to WASM can be found here
- Javy https://github.com/guest271314/native-messaging-webassembly/blob/main/nm_javy.js
- qjs-wasi.wasm https://github.com/guest271314/native-messaging-webassembly/blob/main/nm_qjs_wasi.js
- js2wasm https://github.com/guest271314/native-messaging-webassembly/blob/main/nm_js2wasm.js
to the extent applicable and comparable to JavaScript or TypeScript,
- AssemblyScript https://github.com/guest271314/native-messaging-webassembly/blob/main/nm_assemblyscript.ts
I was referred to StarlingMonkey over here #general > Embedding JavaScript into QuickJS before compiling to WASM.
To be clear, I am not looking for "a" or "the" JavaScript to WASM toolchain; I'm actively testing, breaking, and vetting JavaScript to WASM toolchains and novel implementations, for research and comparative analysis purposes; without any biases or preferences for any. They all get tested until they break, witout rancor, and without exception or handicap.
Assume
- I have basically zero experience writing WIT
- There is zero networking involved in the JavaScript source code
- I just need to read STDIN and write to STDOUT
Questions:
-
In
nodeworld there isprocess.stdinandprocess.stdout, and evenreadFileSyncpoint to0or/dev/stdinor/proc/self/fd/0, and/dev/stdoutor/proc/self/fd/1, respectively. STDOUT !== WHATWG Console'sconsole. What are the specific I/O interfaces StarlingMonkey has implemented? -
The Component Model has the WIT thing - it's own syntax and bassically an entire language itself. What is the minimal WIT that Component Model compilers expect just to read STDIN and write to STDOUT?
-
How to compile generic JavaScript that expects to done only read STDIN and write to STDOUT (neither specified in ECMA-262) - with absolutely no networking involved, no
ServiceWorker-likefetch()handler at all, using StarlingMokey'sstarling.wasmorstarling-raw.wasm?
- Lenguaje dominante
- C
- Estrellas
- 295
- Forks
- 62
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 16
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
- 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 bytecodealliance/StarlingMonkey
-
CryptoKey class should use Finalizable class policyPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bytecodealliance/StarlingMonkey#343 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bytecodealliance/StarlingMonkey#345 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bytecodealliance/StarlingMonkey#344 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
bytecodealliance/StarlingMonkey#339 ·
Los mantenedores suelen responder en 1 día
-
The forgiving decoder implementation is ignoring padding and whitespaces in crypto-algorithm.cppAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
bytecodealliance/StarlingMonkey#338 ·
Los mantenedores suelen responder en 1 día
Todos los issues de bytecodealliance/StarlingMonkey
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cython/cython#8110 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
ai-driven-fuzzing bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
linagora/open-bastion#425 ·
Los mantenedores suelen responder en 1 día
-
[docs] gravity.md notationsAbiertoquestion
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
-
follow-up Prio 📌
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
moonbitlang/async#713 ·
Los mantenedores suelen responder en 1 día