Product

Native Kotlin

Transform Kotlin to a Powerful
Low-Level Language

Same Kotlin, Different Taste

Same Kotlin ingredients, different taste. Native Kotlin makes Kotlin perfect for low-level programming.

  • Support all Kotlin grammar.
  • No hidden memory allocations.
  • No preprocessor.

Comptime

Utilize compiler plugin and KSP (Kotlin Symbol Processing) to generate compile-time code.

  • Zero runtime overhead.
  • Lightweight compile-time API.
  • Compile-time statement optimization.

C-ABI Compatible

Native Kotlin maintains C-ABI compatibility at core.

  • Compile Kotlin to C-ABI compatible library.
  • Use other C library at ease with tooling support.
  • Wrap existing C library.
main.kt
import kotlin.native.heap.PageAllocator

extern fun printf(format: Pointer<Byte>, vararg args: Any): Int

context(Allocator)
fun generateFibonacci(count: UInt) {
    val fibArray = allocArray<UInt>(count)
    fibArray[0u] = 0u
    if (count > 1u) fibArray[1u] = 1u
    for (i in 2u until count) {
        fibArray[i] = fibArray[i - 1u] + fibArray[i - 2u]
    }
    for (i in 0u until count) {
        printf("%u: %u
".cstr, i, fibArray[i])
    }
}

fun main() {
    use(Allocator()) { allocator ->
        with(allocator) {
            generateFibonacci(10u)
        }
    }
}

Documentation Coming Soon...

© Endoqa 2026