Closed arunpadiyan-cred closed 1 year ago
Thanks for sharing those links.
We’re very happy to ship our own JavaScript engine for a few reasons:
As for WebAssembly, it’s unlikely the WebAssembly binaries we’ll build with Kotlin/WASM will work on the WebAssembly runtime built into Android. In particular, Kotlin/WASM needs the garbage collection extension and I don’t believe that’s in Android’s WebAssembly engine.
When Kotlin/WASM is stable and there’s a high-quality open source interpreter we’ll switch to WASM. https://github.com/cashapp/zipline/issues/717
And if ever Android has a built-in interpreter that can host Kotlin/WASM, we’ll consider supporting that too.
@swankjesse - just came across Zipline from this article https://publicobject.com/2024/01/11/wasm/, thanks a lot for mentioning Extism!
We are also working on a high-quality Wasm runtime in pure Java: https://github.com/dylibso/chicory, in case this is still of interest.
It doesn't yet support GC, which would be a blocker to run Kotlin-based wasm code, but it's definitely something we want to add. Maybe there is room to collaborate here!
In any case, really exciting to see Cash App using this mode of updating logic. Nice work!
Is there any plan to replace QuickJS with JavaScriptEngine (https://developer.android.com/jetpack/androidx/releases/javascriptengine), (https://developer.android.com/develop/ui/views/layout/webapps/jsengine) provided by google. I checked the apk size footprint for the same it is only 20KB.