Hi there, is there an example on how to create a W...
# webassembly
a
Hi there, is there an example on how to create a WASM library that can be used from Node.js? Just starting to get an idea of what is possible with WASM… Like, would using WASM make sense if I want to do computation-heavy things on Node? Probably that would require the use of Node workers, wouldn’t it?
Found this article: https://medium.com/geekculture/webassembly-for-node-js-13ef6bec0a0 So my question seems to boil down to: what is the Kotlin alternative to Rust's wasmpack?
k
Do you mean, how would you compile Kotlin to WASM? You can view the multiplatform setup here: https://kotlinlang.org/docs/whatsnew-eap.html#how-to-enable-kotlin-wasm
a
Thanks @K J, this is helpful already. I found https://github.com/linux-china/kotlin-wasm-node-demo, which is pretty much what I was thinking about. The rest (using the compiled code in a Node worker thread) is probably not Kotlin-related.