Is it possible to export a Kotlin function in the ...
# webassembly
s
Is it possible to export a Kotlin function in the
exports
of
WebAssembly.Instance
? I have tried using
@SymbolName
on the functions I want to export, but it's not showing up in the exports object
s
There is no stable API for it yet. For now you can use
@Retain
annotation. Please note that name of the exported function will be mangled (
kfun:...
).
s
Thanks a lot! Can't believe I missed it. It's right above the declaration of
@SymbolName
in the .knm includes 🙈
hmm, it's still not in the exports
at least nothing I can identify. There are some
kfun:
declarations in the firefox disassembly, but nothing containing my package name
and nothing
kfun:
that is exported
Are there other special requirements?
oh never mind, I forgot to set it back to NativeOutputKind.EXECUTABLE