0Pricing
Kotlin Multiplatform Academy · Lesson

cinterop with C Libraries

Bind a C dependency for use in shared code.

Reaching Into C

Sometimes the code you need is a plain C library. Kotlin/Native can call it directly through a tool called cinterop. 🔌

What cinterop Produces

cinterop reads C headers and generates Kotlin bindings. After that, the C functions and types look like ordinary Kotlin declarations you can call.

All lessons in this course

  1. Use Apple Frameworks from Kotlin
  2. Memory & ARC in Kotlin/Native
  3. cinterop with C Libraries
  4. Wrap a Native SDK Cleanly
← Back to Kotlin Multiplatform Academy