What's the difference between the Compose Web js t...
# compose-web
a
What's the difference between the Compose Web js target and wasm target, other than the technology used? any changes in performance or anything else that affects the user experience? in other words: is there a reason to target WASM given it doesnt work on all browsers rn, while the js target 'just works'?
m
Compose Wasm is much better in performance, and it will be the preferred option I guess for Compose Web. We are just waiting for more k/wasm support. https://kotlinlang.org/docs/wasm-overview.html
🔥 3
Also the good thing is that Compose team are sharing code between Compose Web JS and Wasm so most of the time when they add a new feature or fix a bug in Compose Web it's for both JS and Wasm at the same time.
K 1
a
it definitely feels like that. I'm trying to figure out which one to use for library website demos. still undecided I think the js one outputs a much smaller app, so it loads quicker but the wasm is indeed more performant
l
@Alex Styl the wasm binary is usually smaller in my experience for produciton builds
a
@Luca thanks for the reminder there's a producton gradle task. will check eventually
l
yup np, wasm-opt is only run for production afaik 👍
c
We are waiting for Safari to support Wasm targets, until then, JS is the only universal target that supports all the browsers