Hey guys, is someone already running Compose wasm ...
# webassembly
h
Hey guys, is someone already running Compose wasm in production? Can you share your experiences, pitfalls, deployment, debugging, analytics etc ..
a
Last i know , not all browser support wasm yet , So don't think any one took it to production it's useful for internal dashboards/tools
It's really fresh , ktor just supported it (with issues) So making api calls is a struggle Most other major kmp libs are just starting to support so you will spend time building things from scratch until they support It's truly still in alpha 😄
h
Simple web apps are a perfect fit for this that don't require much and usually most websites display data, hell they're not even full crud apps
a
yeah depend on your use case but do be aware of browser support if interested with external users and traffic for example this website works on chrome but not on safari 🤷‍♂️ (btw some lower chrome versions are not supported) https://kmp.telereso.io/Sample/#web-wasm
h
Yeah, for example the input for the currency doesn't work on Android's firefox I guess the best use case for now of wasm is only list details and nothing else that's a bit fancier
t
Not in production yet, but a demo at: https://app.hueessentials.com Still running into some issues unrelated to Kotlin/wasm (my app needs local network access which is complicated)
thank you color 1
🤩 1
r
The main reason for us not to use
Kotlin/WASM
for external projects(in the meaning of availability via web) is that it can not be parsed by search engines. That is because of
canvas
heavy used by
Compose/Web
. This thoughts are about 3 months old, maybe something have changed.
👍 1
h
@rcd27 might be a stupid idea but Compose html might help, idk if it's a smart idea to mix Compose HTML and canvas tho🤔
1
c
a
so the ultimate solution would be compose -> Compose HTML Compose HTML somehow i feel this is reachable with the right configuration
c
If you're interested in Compose HTML, I recommend reading about #kobweb
👍 1
r
You could also check https://kilua.dev and #kilua if you want compose, kotlin/wasm and seo at the same time (disclaimer: I'm the author).
2
r
My main goal is to have single source of truth(backend application) which just "shows" it to the browser. The point is to avoid standalone frontend logic, and have only one module/container which "rules them all".
Would be great to have something like:
Copy code
Application.routes() {
    get('/cases') {
        return call.respondCoolInteractiveHTML/SkikoJS/Watever {
            @Composable
            function Cases() {...}
         }
    }
}
Just imagining.
r
The similar idea is implemented by Kweb https://docs.kweb.io/book/gettingstarted.html#hello-world Unfortunately the project is no longer maintained.
❤️ 1