I just published a new article: How cinterop actually works?
In this post, I explain how cinterop bridges C libraries and Kotlin/Native — from parsing C headers with clang to generating Kotlin bindings and C glue code.
If you're working with native libraries in Kotlin Multiplatform, this should help you understand what's actually happening under the hood.
Hope it would be helpful!
https://medium.com/@behzodhalil/how-cinterop-actually-works-66c301fbe73b