# BABYLON.Utils WASM Module w/ Async API

**URL:** <https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225>\
**Category:** Feature requests\
**Created:** [July 7, 2021, 4:41pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225 "2021-07-07T16:41:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirFizX](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sirfizx/32/11703_2.png) [@SirFizX](https://forum.babylonjs.com/u/SirFizX)\
**Post date:** [July 7, 2021, 4:41pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/1 "2021-07-07T16:41:23Z")

</div>

A BABYLON.Utils **WASM module** running in a _WebWorker_ can provide **async APIs** for **computationally intensive operations**. A `flag` in the engine constructor can `enable/disable` this feature, rather than requiring an additional import. Such an implementation will more cleanly enable the internals of BJS to benefit. Many existing internal operations implemented in Javascript can be pointed to the WASM API if it is enabled.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 7, 2021, 5:33pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/2 "2021-07-07T17:33:09Z")

</div>

What would you put in the lib exactly ?

We already supports some for Draco, KTX and large slow processes but doing it real time every frame for smaller part do sometime not make sense with the extra latency it might add for data transfer.

---

<div class="post-metadata">

**Author:** ![SirFizX](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sirfizx/32/11703_2.png) [@SirFizX](https://forum.babylonjs.com/u/SirFizX)\
**Post date:** [July 7, 2021, 5:38pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/3 "2021-07-07T17:38:38Z")

</div>

This would not be for per frame operations but instead operations such as costly mesh deforming, optimized materials creation, and graph algorithms.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 7, 2021, 5:45pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/4 "2021-07-07T17:45:13Z")

</div>

Yup it is already happening but each of those are their own separate files. Basically, ammo for physics, ktx, draco, webgpu shader compilations.

---

<div class="post-metadata">

**Author:** ![sokorototo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sokorototo/32/11061_2.png) [@sokorototo](https://forum.babylonjs.com/u/sokorototo)\
**Post date:** [July 9, 2021, 10:45am UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/5 "2021-07-09T10:45:50Z")

</div>

WebAssembly is in active usage within Babylon? Does that mean that it comes inline? And therefore one can contribute WebAssembly code to Babylon?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 9, 2021, 5:26pm UTC](https://forum.babylonjs.com/t/babylon-utils-wasm-module-w-async-api/22225/6 "2021-07-09T17:26:03Z")

</div>

This is relying on external packages who are already built. We do not have any c/c++/rust sources in the repo
