frei0r icon indicating copy to clipboard operation
frei0r copied to clipboard

🥼🧪💥 WASM build

Open jaromil opened this issue 3 years ago • 0 comments

Experimental build using emscripten to create WASM filters usable in Javascript

This is just an experiment and implies also the implementation of a static library build that renames all functions.

So far WASM builds of single static libs can be achieved with these commands (and emsdk setup in root project dir)

source ../emsdk/emsdk_env.sh
export CMAKE_TOOLCHAIN_FILE=`pwd`/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
emcmake cmake .. -DCMAKE_C_FLAGS="-s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'" -DCMAKE_CXX_FLAGS="-s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'"

jaromil avatar Jan 08 '23 15:01 jaromil