Here's a little experiment showing how to build a cross-platform C++ OpenCV app that also works in the browser (via emscripten). More details in my OpenCV Web Apps blog post.
To build the project as a Webassembly set the BUILD_WASM option in cmake. A demo is given in docs_wasm.
You try out the demos by using Python's Simple HTTP Server. Run the following command in /docs or /docs_wasm:
python -m SimpleHTTPServer 80
Let's make Sirocco, the real parrot, PARTY!
See it live here!
Built on Windows with CMake, emscripten and ninja.
Credits: Cult of the Party Parrot :: BBC Last Chance To See Kākāpō :: Sirocco