# WebAssembly

**URL:** https://discuss.kotlinlang.org/c/webassembly/50.md

[Latest](https://discuss.kotlinlang.org/latest.md) · [Categories](https://discuss.kotlinlang.org/categories.md)

---

## [About the WebAssembly category](https://discuss.kotlinlang.org/t/about-the-webassembly-category/14100)

<div class="topic-metadata">

**Author:** [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Replies:** 0\
**Last updated:** [August 31, 2019, 10:39am UTC](https://discuss.kotlinlang.org/t/about-the-webassembly-category/14100 "2019-08-31T10:39:38Z")

</div>

Questions and discussion on development with Kotlin and WebAssembly. See also a related #webassembly channel in Kotlin Slack (you can sign up here).

---

## [Pterocos – browser-based code editor with Kotlin/Wasm support (feedback welcome!)](https://discuss.kotlinlang.org/t/pterocos-browser-based-code-editor-with-kotlin-wasm-support-feedback-welcome/31114)

<div class="topic-metadata">

**Author:** [@aminkhd](https://discuss.kotlinlang.org/u/aminkhd)\
**Replies:** 0\
**Last updated:** [July 8, 2026, 1:50pm UTC](https://discuss.kotlinlang.org/t/pterocos-browser-based-code-editor-with-kotlin-wasm-support-feedback-welcome/31114 "2026-07-08T13:50:25Z")

</div>

Hello Kotlin community, I’m excited to share Pterocos – a free, open-source code editor that runs entirely in your browser via WebAssembly, and now supports Kotlin! What it does: :purple\_circle: Kotlin support – wri…

---

## [How to pass rich data from a Wasm host to a Kotlin guest?](https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527)

<div class="topic-metadata">

**Author:** [@upastorm](https://discuss.kotlinlang.org/u/upastorm)\
**Replies:** 6\
**Last updated:** [November 21, 2024, 7:55am UTC](https://discuss.kotlinlang.org/t/how-to-pass-rich-data-from-a-wasm-host-to-a-kotlin-guest/29527 "2024-11-21T07:55:25Z")

</div>

I’m experimenting with using Kotlin compilation to Wasm to run it in an embeddable Wasm runtime like WasmEdge. Rich data exchange usually happens through linear memory. For example, TinyGo compiled-guests export malloc a…

---

## [ReferenceError: getCachedJsObject is not defined](https://discuss.kotlinlang.org/t/referenceerror-getcachedjsobject-is-not-defined/29221)

<div class="topic-metadata">

**Author:** [@basurahan](https://discuss.kotlinlang.org/u/basurahan)\
**Replies:** 1\
**Last updated:** [November 19, 2024, 8:30pm UTC](https://discuss.kotlinlang.org/t/referenceerror-getcachedjsobject-is-not-defined/29221 "2024-11-19T20:30:34Z")

</div>

Hi I am working on a Kotlin Multiplatform project. Android, iOS, JVM is working fine but Web (WasmJS) is not working. I am getting this error whenver i run the compose WASM target getCachedJsObject is not defined Refer…

---

## [Compose support on Kotlin Playground](https://discuss.kotlinlang.org/t/compose-support-on-kotlin-playground/27775)

<div class="topic-metadata">

**Author:** [@pablisco](https://discuss.kotlinlang.org/u/pablisco)\
**Replies:** 1\
**Last updated:** [October 19, 2024, 3:05pm UTC](https://discuss.kotlinlang.org/t/compose-support-on-kotlin-playground/27775 "2024-10-19T15:05:56Z")

</div>

Now that Wasm is on Alpha, I was wondering if it would be possible for the Kotlin Playground to support compose components with previews. It would be a good way to share Compose recipes.

---

## [WASM / WASI Where Do You Go, Kotlin?](https://discuss.kotlinlang.org/t/wasm-wasi-where-do-you-go-kotlin/12175)

<div class="topic-metadata">

**Author:** [@tomschrot](https://discuss.kotlinlang.org/u/tomschrot)\
**Replies:** 17\
**Last updated:** [December 8, 2023, 12:41pm UTC](https://discuss.kotlinlang.org/t/wasm-wasi-where-do-you-go-kotlin/12175 "2023-12-08T12:41:15Z")

</div>

There is a lot going on in Mozilla’s WASM initiative, like here WASI or here Standardizing WASI and it looks like we have a new bright star in the sky of VMs. I wonder if Kotlin wants to be part of the game before G…

---

## [Kotlin/Wasm GC](https://discuss.kotlinlang.org/t/kotlin-wasm-gc/27275)

<div class="topic-metadata">

**Author:** [@Daniil](https://discuss.kotlinlang.org/u/Daniil)\
**Replies:** 2\
**Last updated:** [August 27, 2023, 9:01am UTC](https://discuss.kotlinlang.org/t/kotlin-wasm-gc/27275 "2023-08-27T09:01:50Z")

</div>

Hello, i really love compose and i want compose multiplatform fully support for web. I know the big problem is that wasm doesn’t have stable garbage collection yet. So my question is: does Jetbrains team plan to make the…

---

## [Setting fillStyle on Canvas using new WASM issue](https://discuss.kotlinlang.org/t/setting-fillstyle-on-canvas-using-new-wasm-issue/26477)

<div class="topic-metadata">

**Author:** [@garethwebber](https://discuss.kotlinlang.org/u/garethwebber)\
**Replies:** 2\
**Last updated:** [March 6, 2023, 1:23pm UTC](https://discuss.kotlinlang.org/t/setting-fillstyle-on-canvas-using-new-wasm-issue/26477 "2023-03-06T13:23:20Z")

</div>

I am trying to set fillStyle on a HTML Canvas using the new KotlinWASM. If I pass a string - I get a compiler error. If I force it to Dynamic (to pass typing), I get the browser crashing say the passed value is opaque. …

---

## [Calling JS code from KT/Wasm](https://discuss.kotlinlang.org/t/calling-js-code-from-kt-wasm/25102)

<div class="topic-metadata">

**Author:** [@Octal](https://discuss.kotlinlang.org/u/Octal)\
**Replies:** 0\
**Last updated:** [June 26, 2022, 10:09pm UTC](https://discuss.kotlinlang.org/t/calling-js-code-from-kt-wasm/25102 "2022-06-26T22:09:26Z")

</div>

I want to write a library for developing web games using KT/WASM, but I can’t figure out how to call JS code (specifically, WebGPU and Canvas APIs) from Kotlin.

---

## [How to run WebAssembly with kotlin using washtime](https://discuss.kotlinlang.org/t/how-to-run-webassembly-with-kotlin-using-washtime/24611)

<div class="topic-metadata">

**Author:** [@sahityayadav761](https://discuss.kotlinlang.org/u/sahityayadav761)\
**Replies:** 0\
**Last updated:** [April 14, 2022, 8:36am UTC](https://discuss.kotlinlang.org/t/how-to-run-webassembly-with-kotlin-using-washtime/24611 "2022-04-14T08:36:28Z")

</div>

I need help. I followed this blog. but it’s not working. when I am trying, I read a lot. but could not create a working solution.

---

## [Kotlin, WebAssembly and the JVM library ecosystem?](https://discuss.kotlinlang.org/t/kotlin-webassembly-and-the-jvm-library-ecosystem/21680)

<div class="topic-metadata">

**Author:** [@gamescripting](https://discuss.kotlinlang.org/u/gamescripting)\
**Replies:** 1\
**Last updated:** [April 29, 2021, 8:55pm UTC](https://discuss.kotlinlang.org/t/kotlin-webassembly-and-the-jvm-library-ecosystem/21680 "2021-04-29T20:55:45Z")

</div>

Hi everybody. recently I came across the current plan, to support WebAssembly as a compile target directly from IR instead of Kotlin/Native. I think this is great! Also, I saw that Kotlin will integrate with the WebAss…

---

## [Has anyone used the Kotlinx.wasm.jsinterop to access WebAssembly?](https://discuss.kotlinlang.org/t/has-anyone-used-the-kotlinx-wasm-jsinterop-to-access-webassembly/21570)

<div class="topic-metadata">

**Author:** [@jsoneaday](https://discuss.kotlinlang.org/u/jsoneaday)\
**Replies:** 1\
**Last updated:** [April 21, 2021, 2:48am UTC](https://discuss.kotlinlang.org/t/has-anyone-used-the-kotlinx-wasm-jsinterop-to-access-webassembly/21570 "2021-04-21T02:48:29Z")

</div>

I recently discovered this library but it’s not well documented. Has anyone tried it to call into a wasm module from Kotlin? Any sample code? Best I could find is this article.

---

## [State of WebAssembly in Kotlin](https://discuss.kotlinlang.org/t/state-of-webassembly-in-kotlin/18348)

<div class="topic-metadata">

**Author:** [@bashor](https://discuss.kotlinlang.org/u/bashor)\
**Replies:** 0\
**Last updated:** [July 6, 2020, 10:18pm UTC](https://discuss.kotlinlang.org/t/state-of-webassembly-in-kotlin/18348 "2020-07-06T22:18:40Z")

</div>

Hi, everybody! I just wanted to clarify the current situation of supporting WebAssembly in Kotlin. We are working on a dedicated Kotlin to WebAssembly compiler backend. So all works on wasm support in Kotlin/Native (t…
