hi folks im really excited about the potential for...
# webassembly
j
hi folks im really excited about the potential for kotlin + webassembly. I have been able to compile to wasm using the new beta wasm target but it looks like it always targets javascript as a host environment. Are there any plans to support standalone wasm? Any tips on where I could get started to help with this effort? thank you!
b
Well, main blocker now is lack of GC proposal support in standalone VMs. Aside of that even now you can take generated wasm without js and use it.
btw it’s not “beta” 🙂
Any tips on where I could get started to help with this effort?
Any help with GC proposal support in standalone VMs are welcome: • with implementing parts • file/vote issue to standalone VMs
j
When I inspected the js host file for the wasm file there were several functions that were provided by the JS such as
kotlin.wasm.internal.stringLength_-66337765, kotlin.wasm.internal.isNullish_-370876551"
etc. I dont think we can expect the other standalone vms to provide those functions?
or is there a way to not have the wasm file depend on those?
b
or is there a way to not have the wasm file depend on those?
No, for now.
The most of these imports required for interop with JS, so if you don’t use interop you can provide some/dummy implementations for them.
Usually imports could be provided by users/embeders
j
cool I'll look into providing dummy implementations. thank you!
b
welcome, please share your results then
btw, what is your usecase? Where and how would you like to use kotlin/wasm?
what is your target vm?
j
I wanted to try building an envory proxy plugin with kotlin
envoy currently supports WAVM or V8 for the host
a
what did you mean by
btw its not "beta"
???
s
We haven’t officially “released” anything yet. What gets published is a development snapshot, which can be considered as pre-alpha and pre-beta.
a
ooooh I see. Thanks