sulewicz / emscripten-stdio

Simple demo on how to tackle blocking standard input/output when wrapping native command line programs in WebAssembly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Standard Input and Output in Emscripten

Description

Simple demo on how to tackle blocking standard input/output when wrapping native command line programs in WebAssembly.

screenshot

How to build and run

Native version

mkdir build
cd build
cmake ..
make
./stdio-demo

Web version

First set up Emscripten as instructed here.

mkdir build-wasm
cd build-wasm
emcmake cmake ..
make
../run_server.py

Now open http://localhost:8080/.

About

Simple demo on how to tackle blocking standard input/output when wrapping native command line programs in WebAssembly.

License:GNU General Public License v2.0


Languages

Language:CSS 34.3%Language:JavaScript 30.3%Language:CMake 11.2%Language:HTML 10.4%Language:C 9.5%Language:Python 4.2%