# Doubt with VTK wasm

**URL:** https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203
**Category:** vtk.wasm
**Created:** [December 31, 2025, 6:21am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203 "2025-12-31T06:21:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [December 31, 2025, 6:21am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/1 "2025-12-31T06:21:33Z")

</div>

I have been trying to use the vtk wasm sdk 64 bit with workers for the rendering of openfoam files but am getting issue unable to transfer the canvas to the wasm.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [December 31, 2025, 4:19pm UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/2 "2025-12-31T16:19:37Z")

</div>

can you share error message? it requires some setup to get it working.

Here are example codes you can look at to understand how to transfer canvas to a thread. PThreads can be used in wasm in two configurations.

1. Using `main()` and `-sPROXY_TO_PTHREAD=1` so that emscripten auto transfers canvas to pthread:

2. Without `main()` and manually transfer canvas using `emscripten_pthread_attr_settransferredcanvases`. See `WrappedAsyncClipper::Start` in `WrappedAsyncClipper.cxx`

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [January 2, 2026, 5:33am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/3 "2026-01-02T05:33:42Z")

</div>

Is it possible to do the same with WebGPU classes in vtk. And i want to know if you had made any test on the memory limit of the wasm64 with pthreads in chrome lts.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [January 2, 2026, 12:08pm UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/4 "2026-01-02T12:08:46Z")

</div>

> Is it possible to do the same with WebGPU classes in vtk.

We have not tried it. I expect it to be a rough experience because of mixing pthreads and the async API of webgpu. I found a related feature request in chromium [https://issues.chromium.org/issues/377733413](https://issues.chromium.org/issues/377733413)

The memory limit for all threads combined in wasm64 is 16GB. What is chrome lts?

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [January 2, 2026, 12:17pm UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/5 "2026-01-02T12:17:59Z")

</div>

Thanks,I meant chrome latest version.

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [January 2, 2026, 12:19pm UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/6 "2026-01-02T12:19:00Z")

</div>

okay. it applies to latest as well.

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [January 7, 2026, 7:22am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/7 "2026-01-07T07:22:35Z")

</div>

Another doubt. Does it have openfoam reader?

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [January 7, 2026, 12:18pm UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/8 "2026-01-07T12:18:59Z")

</div>

Yes, it should be compiled in.

---

<div class="post-metadata">

### Author: ![sridhar-mani](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sridhar-mani/32/9522_2.png) [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)
#### Post date: [January 9, 2026, 5:32am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203/9 "2026-01-09T05:32:25Z")

</div>

Thanks it is but unfortunately only the serial version is compiled.
