Providing stdin to an emscripten HTML program?
I have a C program that takes one argument (a char array / string) via command line and also reads from stdin. I've compiled it to JavaScript using emscripten. This was successful and I can run it just like the normal C program using node.js: emcc -O2 translate.c node translate.js "foo" < bar.txt As you can see, I'm providing the string "foo" as an argument and the contents of bar.txt as stdin. Now I want this to be a self-contained HTML file. By changing the output to HTML: emcc -O2 translate.c -o trans.html I provide the argument by adding arguments: ['foo'], to the definitions in var Module