maybe a question for @matt.mccormick: Is there a reason that compiling ITK for wasm using emscripten is not possible from the main ITK repository InsightSoftwareConsortium/ITK?
I think it would greatly simplify building custom Wasm applications that use ITK as static libraries built with emscripten if it would be possible from the main trunk.
I have merged many of the patches for ITK-Wasm into upstream ITK.
Most of the remaining patches were temporary and are related to a lack of threading and related parallelism support in WASI. However, I have been resolving this recently,
They will be removed after support has been finalized.
This is great news, thanks! So which recent revision from which branch in which repository (upstream vs. kitware) should currently be used for wasm builds?
Also is there a current list of cmake flags that need to be applied? In my recent activities often ITK itself could be built successfully but the final wasm application utilizing ITK as a library could not be linked due to some emscripten error (“attempting to pop from empty stack” or something similar - which is difficult to debug).
It is recommended to use the quay.io/itkwasm/emscripten and quay.io/itkwasm/wasi docker images. These contain pre-built ITK and a CMake toolchain file that specifies all the flags. And other tooling that improves performance and debugging capabilities. Builds can be driven through the itk-wasm npm package.