Problems when compilate VTK build for wasm

I see, you are probably using a desktop dawn tarball instead of wasm32 tarball.

Download https://gitlab.kitware.com/api/v4/projects/6955/packages/generic/dawn/v7153-20250502.0/dawn-7153-wasm32-emscripten.tar.gz and extract it.

Then, run the emcmake command with these two extra args.

 -DVTK_ENABLE_WEBGPU:BOOL=ON -Demdawnwebgpu_DIR="C:\Users\username\Downloads\dawn-7153-wasm32-emscripten\dawn-7153-wasm32-emscripten\lib\cmake\emdawnwebgpu"

Double check that there is a file named emdawnwebgpu-config.cmake in the directory passed to emdawnwebgpu_DIR

Do NOT pass -DDawn_DIR when building wasm.

1 Like