KO

Kotlin/Native Build

Build and packaging tools for Kotlin/Native

Details

Language / Topic
kotlin-nativeKotlin/Native
Category
Tooling

Rules

balanced
- Use Kotlin Multiplatform Gradle plugin for project configuration.
- Use `linkDebugExecutable` / `linkReleaseExecutable` tasks for native binary output.
- Use `konan` toolchain and `cinterop` for C library bindings — configure targets in `build.gradle.kts` with `kotlin { targets { native {} } }`.
- Use `-opt` compiler flag for release builds to enable optimizations.
- Generate C interop bindings with `.def` files and the `cinterop` tool.