Does anyone know where I can find the source code ...
# kotlin-native
l
Does anyone know where I can find the source code or documentation about platform libraries, e.g. platform.Foundation.*? I downloaded Kotlin toolchain on Mac, and it seems klib/platform/$target folder contains lots of platform libraries, however I only found
cstubs.bc
file insider, can not find any kotlin bindings, does anyone know how to get kotlin bindings for those platform libraries?
m
l
Thanks for the quick response!
I am more interested in the corresponding Kotlin bindings, can I use
cinterop
tool to generate Kotlin bindings?
e
bindings to Foundation are pre-defined, https://github.com/JetBrains/kotlin/blob/master/kotlin-native/platformLibs/src/platform/osx/Foundation.def as are other standard libraries
d
At the risk of going around in circles... Isn't it the bindings that you found in the target folder?
I wouldn't expect the bindings themselves to be explicitly documented. Take the Kotlin ObjC interop documentation in context with the original iOS API documentation.
l
I tried to run `cinterop`with Foundation.def, it only generates
cstubs.bc
file, same as the one in Kotlin toolchain. I would like to add IDE support for platform libraries, e.g. code completion, syntax error detection, how can I do that without Kotlin bindings?