In order to build Mata library to WASM, you need to have emscripten
set up, along with all of its dependencies.
You can use the system packages or consult emsdk.
For building Mata to WASM then use the following steps:
- create folder
build-wasm
for the WASM build of libmata.a - in
build-wasm
runemcmake cmake -DBUILD_TYPE=Release -DMATA_BUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF ..
- build the library using
emmake make
(the WASM static librarysrc/libmata.a
should be created after that)