eygraber
06/23/2025, 7:21 PMkotlin-js-store/wasm/package-lock.json
and kotlin-js-store/package-lock.json
but that change wasn't mentioned in the What's New.
Just checking, but is that correct that there won't be a js
directory, only a wasm
directory?sns
06/24/2025, 4:29 AMsns
06/24/2025, 4:31 AMJaypalsinh Barad
06/24/2025, 10:01 AM#
from compose navigation?
base_url/#route_name
to base_url/route_name
martmists
06/24/2025, 5:20 PMnamespace JSZip
with new(): this;
and (): JSZip
but I can't figure out how to call it. I tried external fun JSZip
as well as external class JSZip
and both give errors.Anuta Vlad Sv
06/26/2025, 9:18 AMchrisjenx
06/27/2025, 6:18 PMe: java.lang.IllegalStateException: Parent of element (VALUE_PARAMETER kind:Regular name:$composer index:0 type:androidx.compose.runtime.Composer? [assignable]) is not initialized.
Please assign it explicitly or use utility such as IrElement.patchDeclarationParents().
at org.jetbrains.kotlin.ir.declarations.IrDeclarationBase.getParent(IrDeclarationBase.kt:22)
I'll create a ticket, but can't share this project, dunno if anyone can help where the issue might be based on the error?Phil Burk
06/28/2025, 1:09 AM//import exports from "./module.mjs"
import exports from "./composeApp.js"
console.log("Kotlin random code is " + exports.renderKotlinAudio());
But I always get:
SyntaxError: Unexpected identifier 'exports'
I am using Kotlin/Compose multi-platform code. My Kotlin WASM code has:
@OptIn(ExperimentalJsExport::class)
@JsExport
fun renderKotlinAudio(): Float {
return Random.nextFloat()
}
I spent a lot of time with Gemini giving me increasingly complex solutions that did not work.
Has anyone actually done this successfully?Charlie Tapping
06/28/2025, 2:41 PM0.1.1
of its Gradle plugin. This is really exploratory work but ultimately the idea behind producer modules is to have an experience wherefore you write a module of code in Kotlin like you would any other, it has a well defined pure Kotlin interface which other modules
can depend upon, but this module has the potential to be interpreted with all the benefits that come with that I’ve updated the documentation, and added a producer module to the example project for you to see it in action. Do let me know what you think, any feedback is more than welcome ✌️てべすてん- TBSten -
06/29/2025, 1:17 AMkotlin.wasmJs.browser()
and kotlin.wasmJs.nodejs()
to the module.
However, when I run the ./gradlew wasmJsBrowserTest
task for testing, I get the error: command /home/runner/.gradle/nodejs/node-v22.0.0-linux-x64/bin/node' exited with errors (exit code: 1)
(this occurs both in CI and locally).
The ./gradlew jsBrowserTest task succeeds, so this is puzzling.
• CI Error Log:
◦ wasmJsBrowserTest: https://github.com/yumemi-inc/Tart/actions/runs/15945080589/job/44978107464?pr=129#step:6:221
◦ jsBrowserTest: https://github.com/yumemi-inc/Tart/actions/runs/15384920112/job/43281638863?pr=125
• Source code: https://github.com/TBSten/Tart/tree/feature/wasm
◦ You can verify this locally in git clone <https://github.com/TBSten/Tart> && git fetch origin feature/wasm && git checkout feature/wasm
.
As shown in the CI Error Log > jsBrowserTest, no explicit browser setup is performed in the CI environment, but the jsBrowserTest
task has been successful in the past. I expected wasmJs to work similarly, but it does not, which is puzzling.Anuta Vlad Sv
07/01/2025, 7:41 AM@JsExport
expect class WindowManager {
fun close()
}
// jsMain
@JsExport
actual class WindowManager {
fun close() {
window.close()
}
}
Up until now, I could only use the @JsExport annotation on functions. When I tried applying it to a class, I got the error: "This annotation is not applicable to target 'class'. Applicable targets: function."
Is this a documentation error, or is @JsExport now intended to work with classes as well?Vladyslav
07/01/2025, 11:09 AMRobert Jaros
07/01/2025, 1:33 PMThe WebAssembly exception handling 'try' instruction is deprecated and should no longer be used. Please recompile to use the 'try_table' instruction instead.
. Is this a known issue?Charlie Tapping
07/01/2025, 6:59 PMchrisjenx
07/03/2025, 5:43 PM[object WebAssembly.Exception]
at handleError (webpack-internal:///../../node_modules/webpack-dev-server/client/overlay.js:251:58)
at eval (webpack-internal:///../../node_modules/webpack-dev-server/client/overlay.js:274:7)
(When other targets work fine)darkmoon_uk
07/08/2025, 10:57 PMDecimal
abstraction over:
• JVM/Android (BigDecimal
) ✅
• iOS (NSDecimalNumber
) ✅
• ...and finally WasmJs (npm's decimal.js
) ⚠️
In such situations, for the sake of resource efficiency, we would like to use a value class
to unify these.
This is almost working fine - perfectly with JVM/iOS - but theres a problem with equality when it comes to the wasmJs target.
Unless I'm mistaken, it works like this: value class
equality defers to the equals(other: Any?)
of the wrapped value.
...which for JVM and iOS, is already mapped (as a matter of built-in KMP Interop.) to the canonical function of each platform; being JVM equals and iOS isEqual.
With wasmJs (and JS in general I guess?) there is no canonical equality function, which entails that common code equals
can currently only ever compare object identity for WASM/JS value classes ❓
Current 'KMP + value class' design leaves us with no opportunity to defer to a suitable equivalence function (like the equals
function provided by decimal.js).
This breaks use cases for naturally equatable objects.
This means the value class
efficiency dream is off the table ⁉️ Since we can't currently intercept equals
by either:
• Overriding equals
in a value class
(compiler error) 🙅
• Nor at the level of declaring an external class
for JS mapping (an affordance here could be nice) 🙅 (JsAny
vs Any
issue)
Are there any workarounds? While this may not be a bug in KMP JS/WASM target; it appears to be a significant '_feature usability issue_' for such cases.Thierry Kh
07/17/2025, 11:21 PM[object WebAssembly.Exception]
at handleError (<webpack://composeApp/../../node_modules/webpack-dev-server/client/overlay.js?:251:58|webpack://composeApp/../../node_modules/webpack-dev-server/client/overlay.js?:251:58>)
at eval (<webpack://composeApp/../../node_modules/webpack-dev-server/client/overlay.js?:274:7|webpack://composeApp/../../node_modules/webpack-dev-server/client/overlay.js?:274:7>)
I have no idea about what causes this so far.
The Android, JVM and JS apps work. I also use Voyager 1.1.0-beta03 and Multiplatform Settings 1.3.0.
It used to run fine on Kotlin 2.1.20, Compose 1.8.1, lifecycle-runtime-compose 2.9.0-alpha05 and Koin 4.0.2-RC3.John O'Reilly
07/18/2025, 7:54 PMWebAssembly.instantiate(): Import #5281 "./skiko.mjs" "org_jetbrains_skia_Shader__1nMakeWithLocalMatrix": function import requires a callable
LinkError: WebAssembly.instantiate(): Import #5281 "./skiko.mjs" "org_jetbrains_skia_Shader__1nMakeWithLocalMatrix": function import requires a callable
Winson Chiu
07/19/2025, 7:08 PM-Xwasm-use-new-exception-proposal
only for wasmJsDevelopmentRun
and not wasmJsBrowserDistribution
? I've been adding the flag manually when running the former, but curious if it can be automated, because sometimes I forget and waste a build. 😐chrisjenx
07/23/2025, 4:16 PMTóth István Zoltán
07/23/2025, 6:24 PMprivate suspend fun Blob.asByteArray(): ByteArray {
//<https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer>
val buffer = asDynamic().arrayBuffer() as Promise<ArrayBuffer>
return Int8Array(buffer.await()).unsafeCast<ByteArray>()
}
Kinar Sharma
07/24/2025, 12:09 PMWebAssembly.instantiateStreaming(): Compiling function #80262:"in.porter.owner.ownerapp.shared.core.journeys.r..." failed: struct.set[1] expected type (ref null 13693), found struct.get of type (ref null 431) @+13386268
CompileError: WebAssembly.instantiateStreaming(): Compiling function #80262:"in.porter.owner.ownerapp.shared.core.journeys.r..." failed: struct.set[1] expected type (ref null 13693), found struct.get of type (ref null 431) @+13386268
sns
07/24/2025, 11:17 PMcomposeResources
when composeApp.js is loaded on a non root path? I keep on getting MissingResourceException: Missing resource with path: ./composeResources/my.package.name/drawable/compose-multiplatform.xml
Albert
07/25/2025, 7:56 AMmbonnin
07/28/2025, 5:47 PMbrowser
vs node
given that https://youtrack.jetbrains.com/issue/KT-60802 is still an issue? Do you test only a single environment? Do a separate project specifically for testing the other environment? Something else?Alexey Zolotarev
07/30/2025, 12:42 PMMichael Paus
07/31/2025, 10:03 AMeygraber
07/31/2025, 8:16 PMw: The version of the Kotlin/Wasm standard library (2.2.20-Beta2-release-177) differs from the version of the compiler (2.2.0). Please, note that while Kotlin/Wasm is in active development phase only matching versions are supported.
Please, make sure that the standard library has the same version as the compiler. Adjust your project's settings if necessary.
e: warnings found and -Werror specified
chrisjenx
08/02/2025, 2:09 AMPiotr Krzemiński
08/02/2025, 9:44 PM