I wonder if there are plans to make JbCompose truly native. i.e. Kotlin Native as opposed to JVM
b
I wonder if there are plans to make JbCompose truly native. i.e. Kotlin Native as opposed to JVM
j
A couple people have been experimenting in that direction: https://android-review.googlesource.com/c/platform/frameworks/support/+/1463143 Compose is open source, community contributions are welcomed.
g
isnโ€™t this PR about support of JS, not native
I think porting everything on Native require much more work, at least Android and Desktop both have a lot of things from Java, including such important parts as threading and other concurrency primitives But it would of course very cool to see
c
I suppose the direction is away from the JVM ๐Ÿ˜„
๐Ÿ‘ 1
g
Why?
c
I mean effort towards JbCompose with JS is effort away from the JVM and is in the same direction as JbCompose for native, is what I think Jim meant my direction
๐Ÿ‘† 2
g
Not sure that I see connection here, yes, itโ€™s also effort in MPP compose, but it doesnโ€™t mean that JetBrains Compose will focus on K/N, and especially on Kotlin JS
s
Just to mention, the main challenge to make Compose work on JS is to make it compatible with klib compilation Whenever it is done, K/Native conversion feels as much simpler task to handle
๐Ÿ‘† 2
j
Yes, as Caelum and Andrei mentioned, the challenges for K/N and K/JS are very similar, and achieving one of them will make the other one "reasonably easy" (for some definition of "easy").
m
Well, porting compose-runtime is relatively easy, but what about Compose Compiler plugin? Does it work with non-JVM targets?
โ” 2
โ˜๏ธ 1
s
That's exactly what I meant by "making it work with klib" ๐Ÿ™ƒ I think it will be possible to reuse the same logic of plugin between js and native
๐Ÿ˜‡ 1
s
In fact, it is already working for Kotlin/JS but only inside a single module. Here is the demo: https://zal.im/h8/ We are preparing the sources of that prototype. But note that it is far from production, itโ€™s just a proof of concept.
๐Ÿ˜ 1