Alexander Girke
02/25/2023, 7:41 AMExported declaration uses non-exportable parameter type: ULong
-> seems to be ignorable
• .wat file no longer exists
• WASM Instance can be instantiated in nodeJs & function called for Long -> for ULong, WASM Instance can not be instantiated due to Compiling function #656:"fibonacci__JsExportAdapter" failed: type error in branch[0] (expected structref, got i64) @+55427
(function signature looks like fun fibonacci(n: ULong, a: ULong, b: ULong): ULong
)
Also, if I try to add a default value for the parameters a
& b
in the ULong case, I get another error: Duplicate export name 'fibonacci' for function 656 and function 657 @+14021
... Any ideas?sdeleuze
02/25/2023, 7:55 AMLong
instead of ULong
for imports/exports.Alexander Girke
02/25/2023, 8:43 AM• WASM Instance can be instantiated in nodeJs & function called for LongThank you, that's what worked - though the .wat file is still missing. However, the question remains what is going wrong in the ULong case...
sdeleuze
02/25/2023, 10:06 AMbashor
03/08/2023, 11:24 PM-Xwasm-generate-wat
Add into your build.gradle.kts something like:
tasks.withType<org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile>().configureEach {
kotlinOptions.freeCompilerArgs += listOf(
"-Xwasm-generate-wat",
)
}