You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the javascript Streams API would provide a huge improvement to I/O handling for the programs compiled with emscripten.
In the case of the stdin, stdout, stderr files, their API could be improved with:
FS.init() receiving, for stdin a ReadableStream (in addition to the current way)
FS.init() receiving for each of stdout and stderr its own WritableStream
Ideally, these functions would work with arbitrary chunk sizes and the chunks are sent as-is to the program running.
Possibly, emscripten emulated devices would just work this way instead of custom code (I'm not sure about performance here as I don't know the code enough).
For now, I thought the changes and adaptations would be executed in library_fs.js but the code there appears to be incomplete for the purpose of creating devices and pipes.
(Maybe this could also be the basic blocks of a fifo made with mkfifo?)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I believe the javascript Streams API would provide a huge improvement to I/O handling for the programs compiled with emscripten.
In the case of the
stdin
,stdout
,stderr
files, their API could be improved with:FS.init()
receiving, forstdin
a ReadableStream (in addition to the current way)FS.init()
receiving for each ofstdout
andstderr
its own WritableStreamIdeally, these functions would work with arbitrary chunk sizes and the chunks are sent as-is to the program running.
Possibly, emscripten emulated devices would just work this way instead of custom code (I'm not sure about performance here as I don't know the code enough).
For now, I thought the changes and adaptations would be executed in
library_fs.js
but the code there appears to be incomplete for the purpose of creating devices and pipes.(Maybe this could also be the basic blocks of a fifo made with
mkfifo
?)Is this feasible?
Beta Was this translation helpful? Give feedback.
All reactions