For those interested, i started to play around wit...
# webassembly
a
For those interested, i started to play around with the new Kotlin/Wasm target and running the output on Node.js: https://github.com/alxgrk/kotlin-nodejs-wasm-example/ Some questions that arose in the process: 1. Looks like there are currently no store/load methods for unsigned numbers in MemoryAllocator - i.e. load-/storeUByte, load-/storeUShort, etc. are missing. Is there already a Youtrack issue or something? 2. Is/will there be any way to specify the
importObject
for the generated
instantiate
JS method in tests?
s
1. We started with minimal API. Please file an issue. In the meantime you can use
UInt.toInt()
and friends to get corresponding signed numbers with the same binary representation. 2.
instantiate
method takes import object as first parameter.
Copy code
export async function instantiate(imports={}, runInitializer=true) { ... }
You can pass it from another JS module, but gradle plugin’s built-in test runner currently can’t use your custom entry JS module to run tests.
a
Alright, thank you 👍