This is a demo for using C++ code through WebAssembly in a simple web application
Visit the demo at https://westwood846.github.io/waim, choose an image file from your machine and the buttons in the toolbar.
To compile the C++ code:
emcc invert.cpp -O3 \
-s WASM=1 \
-s EXPORTED_FUNCTIONS='["_invert", "_sort", "_malloc", "_free"]' \
-s EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "HEAPU8"]' \
-s ALLOW_MEMORY_GROWTH \
-s ASSERTIONS \
-o invert.jsMake sure you've got EMScripten SDK installed.
