Matt Nelson
01/31/2023, 8:18 PMwasm32
support for a library of mine; secure-random? It's the only platform not supported currently and I've no clue where to start 😢
Issue Ticketbashor
02/01/2023, 4:53 PMbashor
02/06/2023, 11:02 PMPablichjenkov
02/06/2023, 11:13 PMComposy
bashor
02/08/2023, 2:50 PMJames Ward
02/10/2023, 3:26 AMJames Ward
02/10/2023, 4:35 AMwasmBrowserRun
hard codes a default browser exec of google-chrome-canary
?sdeleuze
02/10/2023, 5:24 AMkotlin-js-store/yarn.lock
generated when not using JS dependencies in our Kotlin/Wasm projects? I guess I am not the only one using Kotlin/Wasm to avoid dealing with the crazy JS ecosystem so getting that thing generated (and expected ti be committed for apps I think) by default is a bit irritating.Krystian
02/10/2023, 4:35 PMDaniel Perez
02/11/2023, 8:17 PMsdeleuze
02/12/2023, 8:40 AMFunkyMuse
02/13/2023, 6:59 AMsdeleuze
02/13/2023, 8:16 PMbashor
02/14/2023, 9:42 AMmcpiroman
02/15/2023, 4:50 PMbashor
02/15/2023, 8:44 PMPablichjenkov
02/15/2023, 10:14 PMandylamax
02/16/2023, 8:20 AMbuild.gradle.kts
wasm {
browser()
binaries.executable()
}
with a single index.kt
fun main() {
println("works")
}
when I run ./gradlew wasmBrowserDevelopmentRun
, it fails with
Module build failed: UnhandledSchemeError: Reading from "node:module" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Full error log is in thread.
But how do I successfully run this test app??K J
02/16/2023, 6:36 PMsdeleuze
02/18/2023, 7:14 AMAlexander Girke
02/19/2023, 9:33 AMbashor
02/22/2023, 10:15 PMAlexander Girke
02/24/2023, 8:14 AM1.8.20-Beta
, but was not able to. Basically, the command ~/.gradle/nodejs/node-v19.6.0-darwin-x64/bin/node --experimental-wasm-gc ~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs
failed with the following error message:
file://~/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140
const wasmModule = new WebAssembly.Module(wasmBuffer);
^
CompileError: WebAssembly.Module(): Compiling function #16:"kotlin.collections.IteratorImpl.hasNext" failed: i32.trunc_f64_s[0] expected type f64, found call_ref of type i32 @+14179
at instantiate (file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140:28)
at async file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs:3:17
Is this a known issue?Alexander Girke
02/24/2023, 8:38 AMAlexander 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, 10:13 AM@orangy ndex.html
, the .wasm
file (and the .wat
one when it will be restored) and the .js
file and optionnaly run a web server without having to run a browser (broken on my Linux installation due to some assumption on the executable name + not super practical since a flag is usually needed)?
Currently I do that with a script not sure if there is a better way.
Also how are we supposed to deploy website without that?Oleg Yukhnevich
02/25/2023, 11:18 AMsdeleuze
02/25/2023, 3:10 PMsdeleuze
02/25/2023, 4:40 PMfun main() {
window.onload = { document.body?.sayHello() }
}
With Kotlin/Wasm, I need to write:
fun main() {
window.onload = {
document.body?.sayHello()
null
}
}
To make it compile.sdeleuze
02/25/2023, 7:18 PMsdeleuze
02/25/2023, 7:18 PMDaniele B
02/25/2023, 7:38 PMsdeleuze
02/25/2023, 7:39 PMDaniele B
02/25/2023, 7:41 PMsdeleuze
02/25/2023, 7:42 PMbashor
03/08/2023, 10:13 PMDaniele B
03/09/2023, 10:21 AMbashor
03/09/2023, 12:26 PM