I would like to get C++ std::cin calling a custom JS FS.stdin.
I have tried in the main JS thread using emscripten_set_main_loop with a pure vanilla JS as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/nocomm
I have also tried in the main thread using emscripten_set_main_loop with an es6 module as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/norun
I have also tried running the es6 module in a background worker, blocking its thread (without emscripten_set_main_loop), as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/worker
My goal is to port Stockfish which works writing commands to stdin and returning outputs on stdout.
Can you provide a working example about how to override and call a custom FS.stdin function?
I would like to get C++ std::cin calling a custom JS FS.stdin.
I have tried in the main JS thread using emscripten_set_main_loop with a pure vanilla JS as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/nocomm
I have also tried in the main thread using emscripten_set_main_loop with an es6 module as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/norun
I have also tried running the es6 module in a background worker, blocking its thread (without emscripten_set_main_loop), as you can see here:
https://github.com/MateoLa/wasm-eg/tree/master/guess/worker
My goal is to port Stockfish which works writing commands to stdin and returning outputs on stdout.
Can you provide a working example about how to override and call a custom FS.stdin function?