ahmedre
04/18/2023, 12:39 PMapp:wasmRun
and app:jsRun
(though as an aside, imageviewer today doesn't run using webApp:jsRun
, only using webApp:wasmRun
). what's the difference in this case between the two? is the second one using Skia to render but isn't using webassembly? the reason i am confused is that this is very different than the previous web compose (I am actually using the composables that work on Android/desktop directly here).
2. assuming the answer to point 1 is correct, the page is fine in Chrome, but on Safari, am getting org_jetbrains_skia_DirectContext__1nMakeGL
called before runtime initialization. is this expected?Svyatoslav Kuzmich [JB]
04/18/2023, 1:37 PMI was able to get a fairly complicated project using Compose for Desktop working on the web after some wrestling with getting K2 to compile it.Awesome! Glad to hear that. We don’t support K2 for Wasm target yet, it is better to avoid it for now.
what’s the difference in this case between the two? is the second one using Skia to render but isn’t using webassembly?They both use Skia library compiled to WebAssembly. The difference is that
js
target compiles your Kotlin code to JavaScript, while wasm
compiles Kotlin code to WebAssembly.
the reason i am confused is that this is very different than the previous web compose (I am actually using the composables that work on Android/desktop directly here).We have two versions of Compose: • “Compose for Web” is compatible with Android/Desktop/iOS but it doesn’t use HTML/DOM elements and renders everything on canvas using Skia. • “Compose HTML” is the older version that uses different HTML-like APIs to generate DOM. We currently focus more on the canvas version.
but on Safari, am gettingSafari currently doesn’t support Kotlin/Wasm. If this happens incalled before runtime initialization. is this expected?org_jetbrains_skia_DirectContext__1nMakeGL
jsRun
, #compose-web would be a better place to discuss this problem.ahmedre
04/18/2023, 2:01 PMK2JsIrCompiler
- the strange thing is that i have some errors for example in the common code that the compiler won't complain about if i compile js, but will complain about if i compile wasm.
• i fixed the latter issue for jsRun
(i was missing the onWasmReady
callback). the js one works on Safari 🎉
want to say thanks again - really can't express how amazing this is!