koral
Menu
Kotlin → SolanaIndependent compiler preview
Koral sea dragon with a branching coral crown

Kotlin.
On unfamiliar ground.

Familiar Kotlin. Native Solana programs.
An experimental compiler with output you can inspect.

Source → nativeRead the Kotlin example ↗Local execution / development preview
01

Code you know.
Output you can inspect.

Start with familiar Kotlin. Koral checks a supported subset, emits inspectable C, and builds a native SBF program with Clang and the Agave SDK. The current preview supports Counter and limited owned ULong state. Use the local CLI to build and verify behavior.

Inspect the Kotlin source
package example
import dev.koral.api.*

@Account("counter")
data class Counter(val count: ULong)

@Instruction
fun increment(state: Counter, by: ULong): Counter =
    Counter(checkedAdd(state.count, by))
Download typed-counter.kt ↗
Compare recorded execution

One Counter.
Three implementations.

Recorded local compute units. Same inputs, addresses, and final 49-byte state. Lower CU uses less computation.

Counter · November 11, 2026 · LiteSVM 1.6.1
InstructionNative RustPinocchioKoral
initialize4,6013,1863,366
increment857113107

One initialization and 20 increments. Agave 3.1.10 / platform-tools 1.52. Koral initialization currently trails Pinocchio. Counter measurements do not establish DEX performance; CU and account storage deposits are separate.

Download measurement snapshot ↗

From source
to native.

A 15-second introduction to Koral.
Familiar source. Inspectable output.

Experimental Kotlin compiler · Recorded source example · Local execution

Build and run locally

Requires a development checkout, JDK 17, Node 22.12+, and an installed Agave SBF SDK. Browser compilation will be connected later.

./gradlew test :cli:installDist
export KORAL_SBF_SDK=/path/to/sbf
cli/build/install/koral/bin/koral build \
  examples/typed-counter.kt --out build/counter
npm ci --prefix cli/build/install/koral/testing
cli/build/install/koral/bin/koral test \
  build/counter/counter.so

Explore Koral

Go beneath the surface.

Developer docsExamplesBenchmarksRoadmap