dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 91 forks source link

🥼🧪💥 WASM build #149

Open jaromil opened 1 year ago

jaromil commented 1 year ago

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\"]'"