https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sebastian Sellmair [JB]

03/24/2021, 6:36 PM
Just asking out of curiosity: Is there any library author, that would actually like to have types coming from a custom c-interop in their public APIs? I am not sure if this should actually be supported and if it would be a good thing for the MPP ecosystem. Any feedback is greatly appreciated!
k

Kris Wong

03/24/2021, 6:52 PM
i don't have a use case for this at the moment
r

russhwolf

03/24/2021, 6:54 PM
I don't have a specific use-case off-hand but I can imagine this being useful for a library that targets Kotlin/Native specifically. For example if I'm adding Kotlin shared code a native iOS app that uses SomeFramework, I probably want to expose SomeFramework's types directly in my Kotlin API so the native Swift/Obj-C code doesn't need to convert things manually. If SomeFramework is commonly used, there might be some utility code (eg converters between coroutines and SomeFramework's async APIs) that I want to publish as a Kotlin library for use by other people using SomeFramework in Kotlin/Native. In that case I'd probably want the Kotlin library to expose SomeFramework's types. That said, this particular situation may not be super common.
👍 2
3 Views