Thanks to MpApt from
@Foso I was able to create a
Kotlin Compiler Plugin that generates wrappers around suspend functions so that they can be used from Kotlin Native (as they aren't exposed as such). By adding ´@NativeSuspendFunction` to a suspend function the plugin creates a an extension that exposes a callback that are visible.
I also added support for functions returning
Flow
- those usually aren't usable from Kotlin Native as well.
Gladly accepting any feedback 👍
https://github.com/feilfeilundfeil/kotlin-native-suspend-function-callback