Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv_js.worker.js with MODULARIZE generates invalid code #20800

Open
simonbuehler opened this issue Nov 29, 2023 · 11 comments
Open

opencv_js.worker.js with MODULARIZE generates invalid code #20800

simonbuehler opened this issue Nov 29, 2023 · 11 comments

Comments

@simonbuehler
Copy link

simonbuehler commented Nov 29, 2023

hi,

when trying to run opencv.js wasm + simd (works) + threads (there it explodes) with this command:

/home/user/opencv/emsdk/upstream/emscripten/em++ -s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128  -s ENVIRONMENT=web,worker    -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG   -Wl,--gc-sections  --memory-init-file 0 -s TOTAL_MEMORY=128MB -s WASM_MEM_MAX=4GB -s ALLOW_MEMORY_GROWTH=1 -s MODULARIZE=1 -s EXPORT_NAME="'cv'" -s DEMANGLE_SUPPORT=1 -s FORCE_FILESYSTEM=1 --use-preload-plugins --bind --post-js /home/user/opencv/emsdk/opencv/modules/js/src/helpers.js  -Wno-missing-prototypes @CMakeFiles/opencv_js.dir/objects1.rsp -o ../../bin/opencv_js.js @CMakeFiles/opencv_js.dir/linklibs.rsp

the generated worker code contains this part:

  Module["wasmMemory"] = e.data.wasmMemory;
      Module["buffer"] = Module["wasmMemory"].buffer;
      Module["ENVIRONMENT_IS_PTHREAD"] = true;
      if (typeof e.data.urlOrBlob == "string") {
        importScripts(e.data.urlOrBlob);
      } else {
        var objectUrl = URL.createObjectURL(e.data.urlOrBlob);
        importScripts(objectUrl);
        URL.revokeObjectURL(objectUrl);
      }
      //cv(Module); <-- cv is not defined here
    } else if (e.data.cmd === "run") {
      Module["__emscripten_thread_init"](e.data.pthread_ptr, 0, 0, 1);
      Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);
      Module["establishStackSpace"]();
      Module["PThread"].receiveObjectTransfer(e.data);

which has the source here:

{{{ EXPORT_NAME }}}(Module);

i just commented it out, and it works(?)

  • Is this valid to just comment out?
  • why is cv not defined, is it a async issue?
  • whats the idea of a cv(Module) call
@simonbuehler
Copy link
Author

simonbuehler commented Nov 29, 2023

Details user@DESKTOP-68JUJRU:~/opencv/emsdk$ python ./opencv/platforms/js/build_js.py --cmake_option="-DCMAKE_TOOLCHAIN_FILE=/home/user/opencv/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" --cmake_option="-DCMAKE_CROSSCOMPILING_EMULATOR=/home/user/opencv/emsdk/node/16.20.0_64bit/bin/node" build_wasm --build_wasm --simd --threads --build_flags=" -s ENVIRONMENT=web,worker " Args: Namespace(build_dir='build_wasm', opencv_dir='/home/user/opencv/emsdk/opencv', emscripten_dir='/home/user/opencv/emsdk', build_wasm=True, disable_wasm=False, disable_single_file=False, threads=True, simd=True, build_test=False, build_perf=False, build_doc=False, build_loader=False, clean_build_dir=False, skip_config=False, config_only=False, enable_exception=False, cmake_option=['-DCMAKE_TOOLCHAIN_FILE=/home/user/opencv/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake', '-DCMAKE_CROSSCOMPILING_EMULATOR=/home/user/opencv/emsdk/node/16.20.0_64bit/bin/node'], build_flags=' -s ENVIRONMENT=web,worker ', build_wasm_intrin_test=False, config='/home/user/opencv/emsdk/opencv/platforms/js/opencv_js.config.py', webnn=False) Check dir /home/user/opencv/emsdk/build_wasm (create: True, clean: False) Check dir /home/user/opencv/emsdk/opencv (create: False, clean: False) ----------------------------------------------------------- options.opencv_dir: /home/user/opencv/emsdk/opencv Check dir /home/user/opencv/emsdk (create: False, clean: False) ===== ===== Config OpenCV.js build for wasm ===== Executing: ['cmake', '-DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python', '-DENABLE_PIC=FALSE', '-DCMAKE_BUILD_TYPE=Release', "-DCMAKE_TOOLCHAIN_FILE='/home/user/opencv/emsdk/cmake/Modules/Platform/Emscripten.cmake'", "-DCPU_BASELINE=''", '-DCMAKE_INSTALL_PREFIX=/usr/local', "-DCPU_DISPATCH=''", '-DCV_TRACE=OFF', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_1394=OFF', '-DWITH_ADE=OFF', '-DWITH_VTK=OFF', '-DWITH_EIGEN=OFF', '-DWITH_FFMPEG=OFF', '-DWITH_GSTREAMER=OFF', '-DWITH_GTK=OFF', '-DWITH_GTK_2_X=OFF', '-DWITH_IPP=OFF', '-DWITH_JASPER=OFF', '-DWITH_JPEG=OFF', '-DWITH_WEBP=OFF', '-DWITH_OPENEXR=OFF', '-DWITH_OPENGL=OFF', '-DWITH_OPENVX=OFF', '-DWITH_OPENNI=OFF', '-DWITH_OPENNI2=OFF', '-DWITH_PNG=OFF', '-DWITH_TBB=OFF', '-DWITH_TIFF=OFF', '-DWITH_V4L=OFF', '-DWITH_OPENCL=OFF', '-DWITH_OPENCL_SVM=OFF', '-DWITH_OPENCLAMDFFT=OFF', '-DWITH_OPENCLAMDBLAS=OFF', '-DWITH_GPHOTO2=OFF', '-DWITH_LAPACK=OFF', '-DWITH_ITT=OFF', '-DWITH_QUIRC=ON', '-DBUILD_ZLIB=ON', '-DBUILD_opencv_apps=OFF', '-DBUILD_opencv_calib3d=ON', '-DBUILD_opencv_dnn=ON', '-DBUILD_opencv_features2d=ON', '-DBUILD_opencv_flann=ON', '-DBUILD_opencv_gapi=OFF', '-DBUILD_opencv_ml=OFF', '-DBUILD_opencv_photo=ON', '-DBUILD_opencv_imgcodecs=OFF', '-DBUILD_opencv_shape=OFF', '-DBUILD_opencv_videoio=OFF', '-DBUILD_opencv_videostab=OFF', '-DBUILD_opencv_highgui=OFF', '-DBUILD_opencv_superres=OFF', '-DBUILD_opencv_stitching=OFF', '-DBUILD_opencv_java=OFF', '-DBUILD_opencv_js=ON', '-DBUILD_opencv_python2=OFF', '-DBUILD_opencv_python3=OFF', '-DBUILD_EXAMPLES=ON', '-DBUILD_PACKAGE=OFF', '-DBUILD_TESTS=ON', '-DBUILD_PERF_TESTS=ON', '-DCMAKE_TOOLCHAIN_FILE=/home/user/opencv/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake', '-DCMAKE_CROSSCOMPILING_EMULATOR=/home/user/opencv/emsdk/node/16.20.0_64bit/bin/node', '-DBUILD_DOCS=OFF', '-DWITH_PTHREADS_PF=ON', '-DCV_ENABLE_INTRINSICS=ON', '-DBUILD_WASM_INTRIN_TESTS=OFF', "-DCMAKE_C_FLAGS='-s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker '", "-DCMAKE_CXX_FLAGS='-s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker '", '/home/user/opencv/emsdk/opencv'] Re-run cmake no build system arguments -- Detected processor: x86 -- Looking for ccache - not found -- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources -- OpenJPEG: VERSION = 2.5.0, BUILD = opencv-4.8.0-dev-openjp2-2.5.0 -- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.5.0") -- libva: missing va.h header (VA_INCLUDE_DIR) -- Module opencv_ts disabled because opencv_imgcodecs dependency can't be resolved! -- Allocator metrics storage type: 'long long' -- Excluding from source files list: modules/imgproc/src/corner.avx.cpp -- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp -- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp -- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp -- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp -- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp -- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp -- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /home/user/opencv/emsdk/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake -- opencv_dnn: filter out ocl4dnn source code -- opencv_dnn: filter out cuda4dnn source code -- Excluding from source files list: modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.neon.cpp -- Excluding from source files list: /modules/dnn/layers/layers_common.avx.cpp -- Excluding from source files list: /modules/dnn/layers/layers_common.avx2.cpp -- Excluding from source files list: /modules/dnn/layers/layers_common.avx512_skx.cpp -- Excluding from source files list: /modules/dnn/layers/layers_common.rvv.cpp -- Excluding from source files list: /modules/dnn/layers/layers_common.lasx.cpp -- Excluding from source files list: /modules/dnn/int8layers/layers_common.avx2.cpp -- Excluding from source files list: /modules/dnn/int8layers/layers_common.avx512_skx.cpp -- Excluding from source files list: /modules/dnn/int8layers/layers_common.lasx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_block.avx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_block.avx2.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_block.neon.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_depthwise.avx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_depthwise.avx2.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx2.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon_fp16.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx2.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp -- Excluding from source files list: /modules/dnn/layers/cpu_kernels/fast_gemm_kernels.lasx.cpp -- Excluding from source files list: modules/features2d/src/fast.avx2.cpp -- Wrapped in JavaScript(js): -- opencv_core -- opencv_imgproc -- opencv_photo -- opencv_dnn -- opencv_features2d -- opencv_calib3d -- opencv_objdetect -- opencv_video -- Found 'misc' Python modules from /home/user/opencv/emsdk/opencv/modules/python/package/extra_modules -- Found 'mat_wrapper;utils' Python modules from /home/user/opencv/emsdk/opencv/modules/core/misc/python/package -- -- General configuration for OpenCV 4.8.0-dev ===================================== -- Version control: 4.8.0-417-g2c1ec4245d-dirty -- -- Platform: -- Timestamp: 2023-11-27T14:22:05Z -- Host: Linux 4.19.128-microsoft-standard x86_64 -- Target: Emscripten 1 x86 -- CMake: 3.22.1 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/gmake -- Configuration: Release -- -- CPU/HW features: -- Baseline: -- -- C/C++: -- Built as dynamic libs?: NO -- C++ standard: 11 -- C++ Compiler: /home/user/opencv/emsdk/upstream/emscripten/em++ (ver 18.0.0) -- C++ flags (Release): -s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C++ flags (Debug): -s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- C Compiler: /home/user/opencv/emsdk/upstream/emscripten/emcc -- C flags (Release): -s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -- C flags (Debug): -s WASM=1 -s SINGLE_FILE=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -msimd128 -s ENVIRONMENT=web,worker -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG -- Linker flags (Release): -Wl,--gc-sections -- Linker flags (Debug): -Wl,--gc-sections -- ccache: NO -- Precompiled headers: NO -- Extra dependencies: -- 3rdparty dependencies: zlib libprotobuf quirc -- -- OpenCV modules: -- To be built: calib3d core dnn features2d flann imgproc js objdetect photo video -- Disabled: highgui imgcodecs ml stitching videoio world -- Disabled by dependency: ts -- Unavailable: gapi java python2 python3 -- Applications: examples -- Documentation: js -- Non-free algorithms: NO -- -- GUI: -- -- Media I/O: -- ZLib: build (ver 1.2.13) -- JPEG 2000: build (ver 2.5.0) -- HDR: YES -- SUNRASTER: YES -- PXM: YES -- PFM: YES -- -- Video I/O: -- -- Parallel framework: pthreads -- -- Other third-party libraries: -- VA: NO -- Custom HAL: NO -- Protobuf: build (3.19.1) -- Flatbuffers: builtin/3rdparty (23.5.9) -- -- Python (for build): /usr/bin/python -- -- Install to: /usr/local -- ----------------------------------------------------------------- -- -- Configuring done

@simonbuehler
Copy link
Author

i found out that cv is defined but it is a promise and not the settled object:

console.log(cv) gives [object Promise]

so cv(Module) fails, how should this be handled?

@simonbuehler
Copy link
Author

sorry for spamming: even if cv would be resolved - cv is not a function, so whats the idea behind cv(Module), whats that supposed to do ?

@sbc100
Copy link
Collaborator

sbc100 commented Nov 30, 2023

The -sMODULARIZE settings generates a promise which gets resolved when the module is ready. cv(Module) is essentially a constructor fro the module in this case.

@Jove125
Copy link

Jove125 commented Feb 14, 2024

So what's the solution?
How to fix an error in a multi-threaded build? - Adding the -sMODULARIZE setting does not change anything.
Is it correct to comment out this line?

//cv(Module);

@sbc100
Copy link
Collaborator

sbc100 commented Feb 14, 2024

Does it work if you remove the -sMODULARIZE flag from the command line?

@Jove125
Copy link

Jove125 commented Feb 14, 2024

Does it work if you remove the -sMODULARIZE flag from the command line?

No, it does not work.
I didn't have this setting initially (I don't know what it's for). I set --build_wasm --threads only.
But cv is promise in both cases.

I tried to get the result of promise and then call result(Module), but that doesn't work too.
Only works if to comment out this line - cv(Module), but I'm not sure if after this everything works as it should.

@sbc100
Copy link
Collaborator

sbc100 commented Feb 14, 2024

If you are not using -sMODULARIZE (or -sEXPORT_ES6) then I don't see how cv could be a promise and the code in question would never be generated. See how cv(Module) is wrapped in the if MODULARIZE block:

emscripten/src/worker.js

Lines 205 to 211 in 58cf85c

#if MODULARIZE
#if MINIMAL_RUNTIME
{{{ EXPORT_NAME }}}(imports);
#else
{{{ EXPORT_NAME }}}(Module);
#endif
#endif

Or is the cv(Module) you are seeing coming from somewhere else?

@Jove125
Copy link

Jove125 commented Feb 14, 2024

If you are not using -sMODULARIZE (or -sEXPORT_ES6) then I don't see how cv could be a promise and the code in question would never be generated. See how cv(Module) is wrapped in the if MODULARIZE block:

emscripten/src/worker.js

Lines 205 to 211 in 58cf85c

#if MODULARIZE
#if MINIMAL_RUNTIME
{{{ EXPORT_NAME }}}(imports);
#else
{{{ EXPORT_NAME }}}(Module);
#endif
#endif

Or is the cv(Module) you are seeing coming from somewhere else?

I looked at the logs. This setting is actually set (implicitly, since I did not specify it):
/home/user/emsdk/upstream/emscripten/em++ -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -Wl,--gc-sections --memory-init-file 0 -s TOTAL_MEMORY=128MB -s WASM_MEM_MAX=1GB -s ALLOW_MEMORY_GROWTH=1 -s MODULARIZE=1 -s SINGLE_FILE=1 -s EXPORT_NAME="'cv'" -s DEMANGLE_SUPPORT=1 -s FORCE_FILESYSTEM=1 --use-preload-plugins --bind --post-js /home/user/opencv/modules/js/src/helpers.js -Wno-missing-prototypes @CMakeFiles/opencv_js.dir/objects1.rsp -o ../../bin/opencv_js.js @CMakeFiles/opencv_js.dir/linklibs.rsp

Should it be disabled for it to work correctly?

@sbc100
Copy link
Collaborator

sbc100 commented Feb 14, 2024

Well, for sure -sMODULARIZE should work in all cases like this, but clearly its causing trouble here, so one way to fix it would be to stop using -sMODULARIZE.

The real fix is to find out why -sMODULARIZE is not working in this case.. but that will require deeper investigation.

BTW, I would also try to remove some of those other settings. For example -sSINGLE_FILE (is the really needed in your case?), -sWASM_MEM_MAX=1GB (that seems like a lot), -s WASM=1 (This is the default so not needed) , -sDEMANGLE_SUPPORT (that setting doesn't really do anything anymore)

@Jove125
Copy link

Jove125 commented Feb 14, 2024

Well, for sure -sMODULARIZE should work in all cases like this, but clearly its causing trouble here, so one way to fix it would be to stop using -sMODULARIZE.

The real fix is to find out why -sMODULARIZE is not working in this case.. but that will require deeper investigation.

BTW, I would also try to remove some of those other settings. For example -sSINGLE_FILE (is the really needed in your case?), -sWASM_MEM_MAX=1GB (that seems like a lot), -s WASM=1 (This is the default so not needed) , -sDEMANGLE_SUPPORT (that setting doesn't really do anything anymore)

Ok, thank you, I'll try to edit default opencv.js settings in CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants