elide kotlinc runs the Kotlin compiler included with Elide. Elide 1.5.0
includes Kotlin 2.4.10.
The JVM toolchain (kotlinc, javac, ktfmt, and the compiler plugins such as
Metro) ships as a separate native library, lib/libjvmtools.so (.dylib on
macOS), inside the Elide distribution. It is loaded only when a toolchain command
runs, or when elide run compiles a Kotlin or Java source file, so it adds
nothing to the runtime’s startup or memory footprint. A distribution that omits
the library is runtime-only: toolchain commands then report that the full
distribution is required. Fully static (musl) builds embed the toolchain in the
elide binary instead.
Compile source files
// Hello.kt
fun main() = println("Hello!")elide kotlinc -- -d out Hello.kt
elide java -- -cp out HelloKt
Options for Kotlin’s compiler go after --. Elide-specific options go before
it. Use the two help surfaces to distinguish them:
elide kotlinc --help
elide kotlinc -- -helpUseful Elide options
| Option | Purpose |
|---|---|
--incremental | Reuse incremental compiler state between invocations. |
--incremental-cache-dir DIR | Choose where incremental state is stored. |
--plugins LIST | Enable included compiler plugins explicitly. |
--tests | Enable the plugins used by test compilation. |
--max-errors N | Limit rendered diagnostics; 0 shows all. |
More specialized worker and ABI options are shown by elide kotlinc --help.
They are intended for build-system integrations rather than ordinary command
line use.
Build projects
elide build compiles Kotlin source sets declared in elide.pkl. Keep project
compiler settings in the manifest so local and CI builds use the same options.
See Elide Projects for source sets and build configuration.