Hello everyone! Am I right that using Compose Mult...
# webassembly
g
Hello everyone! Am I right that using Compose Multiplatform I can compile only in WASM, not in pure JS ?
a
You can compile to both. Wasm and JS
g
I'm looking at https://github.com/Kotlin/kotlin-wasm-examples/tree/main/compose-imageviewer. What gradle task I should use to run JS version of it?
s
I think Wasm support is not really usable outside of demos, and may require custom builds of dependencies.
So for now maybe better to use JS and wait Kotlin 1.9 and related Compose release to start using Wasm version for experimentation.
g
I was thinking that I can't run my Compose Desktop in Browser by JS, only by wasm compilation
a
To answer your question on what gradle task. Try
Copy code
./gradlew :webApp:jsBrowserDevelopmentRun
g
I've tried but got
Copy code
java.lang.IllegalStateException: FATAL ERROR: Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime"
What I'm really trying to understand is that : Is it possible to run Compose Desktop App inside browser now or I have to wait for Webassembly?
s
Possible with JS today yes.
g
Do you know any working example projects?
s
Check maybe in #compose-web history
a
wait, running compose desktop app inside browser?? I don't think I am understanding this question properly
g
There is Compose Multiplatform app which I can run on Android, Desktop and Webassembly.
BTW, according to #compose-web there is no Compose JS. They are stick to Wasm now
a
Compose JS has been split into two. Compose HTML and Compose Web. So there is still Compose JS in a sense that there is Compose HTML still