Overview
kotlin-native-nuget is a Gradle plugin that bridges Kotlin/Native and C# across a NuGet package boundary.
It works in two directions:
Kotlin → C# (forward): publish a Kotlin/Native library as a NuGet package. KSP generates a C#
Interop.csat compile time, so consumers add the package and call your Kotlin API as ordinary C# classes. No consumer-side tooling required.C# → Kotlin (reverse): bind a C# NuGet package's public API into Kotlin. The Gradle plugin resolves the dependency, extracts its API surface, and generates Kotlin-idiomatic stubs backed by opaque handles.
Where to go next
Setup: prerequisites, getting started end to end, the Gradle tasks the plugin registers, and the
nuget {}DSL reference.How-to guides: follow a complete walkthrough to publish a Kotlin/Native library as NuGet or bind a NuGet package for Kotlin.
Publishing Kotlin to C#: the forward direction, what Kotlin constructs map to what C#.
Consuming C# in Kotlin: the reverse direction, binding a NuGet package into Kotlin.