what are the current advantages of using kotlin/wa...
# webassembly
c
what are the current advantages of using kotlin/wasm over kotlin/js for a browser app?
👀 1
a
It depends on your case. If talk in general. First, it is for the computational performance improvements (You can check the performance comparisons here). For example, if you are using Compose for Web, using K/Wasm instead of K/JS could multiply the speed of your application drawing. Bundle size is also a metric that you could care about, and the wasm binary could be much lighter than a JS bundle, so your users could start interacting with your application sooner. Also, we are trying to make K/Wasm types stricter than K/JS, which means a safer (from bugs) development environment (You can check the overview here). This is my point of view, and I think @bashor could also add several points.
1
c
does wasm also need a bundler? one disadvantage for me that kotlin/js had was always that it uses webpack and that the js was not really tree shakeable. are these problems obsolete with wasm, or would it still make sense to try to replace webpack with for example vite?
a
So, the question is tricky. No, there is no need for a bundler. But we still use it in our Gradle plugin, because we reuse a lot of things from the K/JS Gradle Plugin. But we are working on removing it for wasm (or at least making it optional) and also, we have big plans in Kotlin/JS to make it bundler-agnostic (so, you will have the ability to use it without bundler at all or to choose your favorite one)
👍 3
👍🏾 1
c
thats great to hear, are there youtrack issues tracking this?