I’m wondering about what is state of web version. ...
# confetti
b
I’m wondering about what is state of web version. Do you have a list of missed dependencies if there is any?
cc @John O'Reilly
j
@Arkadii Ivanov sounded from that like that last Decompose beta had some changes that should help here?
a
The Decompose version currently used in Confetti already supports Wasm!
πŸ‘ 1
j
Another dependency then that we needed was Square's Wire....I asked about that in https://kotlinlang.slack.com/archives/CDFP59223/p1711883391246209
b
Is wire the last missed part?
j
I think MultiplatformSettings is another one needed....
πŸ‘ 1
Seems like 1.2 release of that might include necessary support
Project is also using Napier which also seems to not have support....but maybe can switch to different library like kermit https://github.com/AAkira/Napier/issues/117
Yeah, looks like Kermit does support Wasm https://github.com/touchlab/Kermit/releases
I'll take another look soon and see if I can maybe setup source sets etc and some expect/actual stuff to workaround the missing ones for now
πŸ‘ 1
ah there was also
apollo-normalized-cache-sqlite
but maybe we can work around that....
@mbonnin it's actually also complaining about
com.apollographql.apollo3:apollo-adapters
....should that work with Wasm atm?
m
That was probably blocked on kotlinx.datetime. I can probably update that now, will double check
πŸ‘ 2
kotlinx.datetime is there but there's a bit of BigDecimal stuff we need to do. Will look into it
j
I built 1.2 branch of MultiplatformSettings locally and confirmed that does support Wasm......we're getting there πŸ™‚
Not fully sure yet about Wire.....ideally of course that will get Wasm support but hopefully way we can workaround that using exect/actual etc. (only used on android/wear os right now I believe)
@bashor following is the Apollo Kotlin/JS code that I've started to look at getting to work in Wasm.....just in case you know of anything similar done elsewhere https://github.com/apollographql/apollo-kotlin/blob/main/libraries/apollo-adapters/src/jsMain/kotlin/com/apollographql/apollo3/adapter/BigDecimal.kt
this is my attempt at updating this.... @bashor would be great if you could take quick look in case anything jumps out https://github.com/apollographql/apollo-kotlin/pull/5803/
πŸ’™ 1
Lots of hacks so far but working for the most part on Web......using local branches of Apollo and MultiplatformSettings and still a few things commented out but this is at least same shared Compose code (that's also used on other platforms)
πŸŽ‰ 1
a few things like back buttons not working and images not showing for some reason but probably ways to address those
found out why images weren't being displayed!
πŸ™ˆ 1
m
It's always CORS πŸ˜„
j
one alternative I guess is that we cache the images in our backend to get around this
(found workaround btw for that last issue....from official samples)
Created draft PR with changes made so far https://github.com/joreilly/Confetti/pull/1272
Initial version deployed to https://wasm.confetti-app.dev/
πŸŽ‰ 1
hmm, deployed again and seem to be getting some errors now....
ok, now it seems ok...not sure what issues were before
b
@John O'Reilly sorry missed messages above. I think I’ve seen some pure kotlin BigDecimal implementations, IDK how production-ready they are.
big.js based implementation might be ok as well, at least for quick prototype. Depends on how it’s used.
If it’s used often I’d check pure Kotlin implementation which might be faster when compiled to wasm
m
I think I've seen something in the KotlinConf schedule as well, let me dig
Screenshot_20240422-164009.png
πŸ‘ 1
It's your 2nd link
b
Nice catch πŸ™‚
m
Not sure it does JS though πŸ€”
Since it goes into cinterop