compile wasm failed

I follow guide to compile build-vtk-wasm, use master branch, but i got this error:

vtkWebGPURenderWindow.cxx:197:29: error: no member named ‘Undefined’ in ‘wgpu::BackendType’
case wgpu::BackendType::Undefined:

and soon on like this:

vtkWebGPURenderWindow.cxx:217:11: error: no member named ‘backendType’ in ‘wgpu::RequestAdapterOptions’
options.backendType = this->RenderingBackendType;

i can compile success when switch branch to tag-9.3, but it lost some function i need, like ‘SetInputArray’

auto reader = vtkXMLUnstructuredGridReader::New();
reader->SetInputArray(wrappedArray);

here is build command:

emcmake cmake
-G “Ninja”
-S ./src
-B ./build-vtk-wasm
-DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=Release
-DVTK_ENABLE_LOGGING:BOOL=OFF
-DVTK_ENABLE_WRAPPING:BOOL=OFF
-DVTK_MODULE_ENABLE_VTK_hdf5:STRING=NO
-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2:STRING=DONT_WANT
-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2:STRING=DONT_WANT
-DVTK_MODULE_ENABLE_VTK_RenderingCellGrid:STRING=NO
-DVTK_MODULE_ENABLE_VTK_sqlite:STRING=NO
-DCMAKE_INSTALL_PREFIX=“./install”

cd ./build-vtk-wasm
ninja

in addition, i didn’t use docker, i compile in local.

@jaswantp

oh, i solved that problem, because i use emscripten version 3.1.38 before. it not show error after i update to latest version of 3.1.49

Glad you were able to solve it. The WebGPU rendering classes in VTK are experimental because webgpu C API is continuously being developed. Such change in struct definitions are to be expected for a while.