From 64e6b43cf52d72c930d1d1f8ee61a209cb472e9b Mon Sep 17 00:00:00 2001 From: neurolabusc Date: Tue, 20 Aug 2024 14:29:54 -0400 Subject: [PATCH] WASM build --- console/makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/console/makefile b/console/makefile index 0b236b13..db22282b 100644 --- a/console/makefile +++ b/console/makefile @@ -53,3 +53,8 @@ sanitize: noroi: g++ $(CFLAGS) -I. $(JSFLAGS) $(JFLAGS) $(LFLAGS) $(UFILES) -DmyNoRois + +wasm: +wasm: + emcc -O3 $(UFILES) -s DEMANGLE_SUPPORT=1 -s EXPORTED_RUNTIME_METHODS='["callMain", "ccall", "cwrap", "FS_createDataFile", "FS_readFile", "FS_unlink", "allocateUTF8", "getValue", "stringToUTF8", "setValue"]' -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -s EXPORT_ES6=1 -s MODULARIZE=1 -s EXPORTED_FUNCTIONS='["_main", "_malloc", "_free"]' -s INVOKE_RUN=0 -o ../js/src/niimath.js +