koral
Menu

Get started / Development preview

From source to native.

Build a local program, inspect its artifacts, and check its behavior in a local Solana VM.

Before you begin

This guide starts inside a Koral utility source checkout. Public repository release is pending; this is a guide for evaluating the development preview.

  • JDK 17 for the Gradle toolchain.
  • Node.js 22.12 or newer for local VM checks.
  • An installed Agave SBF C SDK.

The recorded development environment is macOS arm64, Agave 3.1.10 / platform-tools 1.52, and LiteSVM 1.6.1. Other hosts have not been verified.

01 / Prepare

Build the CLI.

./gradlew test :cli:installDist
export KORAL_SBF_SDK=/path/to/sbf
cli/build/install/koral/bin/koral doctor

The SDK directory must contain c/inc, c/sbf.ld, and dependencies/platform-tools. The doctor command checks the local toolchain.

02 / Compile

Check. Then build.

cli/build/install/koral/bin/koral check \
  examples/typed-counter.kt
cli/build/install/koral/bin/koral build \
  examples/typed-counter.kt --out build/counter

Koral inspects Kotlin compiler IR, validates its supported subset, emits C, and invokes Clang/LLVM with the Agave SDK. The resulting Solana program contains native SBF code, with no JVM.

03 / Verify

Run the local check.

npm ci --prefix cli/build/install/koral/testing
cli/build/install/koral/bin/koral test \
  build/counter/counter.so

The Counter runner uses a local VM and deterministic test signers. These commands do not deploy to mainnet or require a wallet connection.

Keep the output inspectable.

A build writes generated C, a bounded model, runtime header, native .so, hash manifest, and ABI JSON. Inspect these artifacts alongside the original Kotlin. Passing local checks is useful engineering evidence; it is not a security audit.

Read the example walkthrough ↗