Hi everyone,
I’ve been working on Kanama, an experimental Kotlin scripting runtime for Godot.
Kanama lets you attach .kt files to Godot nodes as script resources, build them with Gradle/KSP, and run them through a GDExtension runtime powered by the JVM and Java’s Foreign Function & Memory API.
The goal is to keep the usual Godot workflow, but make Kotlin available for game code.
For example:
@ScriptClass(attachTo = "Node")
class HelloKanama(godotObject: MemorySegment) :
KanamaScript<Node>(godotObject, ::Node) {
@OnReady
fun ready() {
GD.print("Hello from Kotlin")
}
}
In the editor, the Kotlin file is loaded as a script resource and can be attached to a node. The runtime handles script registration, lifecycle callbacks, Godot API calls, signals, exported properties, and hot reload.
Current status:
- Experimental 0.1.0 preview available today
- Targets Godot 4.7 beta 2
- Desktop-first (macOS arm64, Windows x64, Linux x64, and Linux arm64)
- Android export is experimental
- iOS export is not available
- Web export is not planned
- Supports
@Tool - Supports debugging in IntelliJ / Running projects
- Comes with a companion addon to make it easy to build from within Godot 4.
Some difference compared to other solutions
- No engine fork
- No engine module
- No JNI glue in game code
- Uses Gradle/KSP for project scripts and generated script metadata
- Generated Godot API wrappers are available and still growing
The companion demo repo includes several ported Godot projects and small gameplay samples. I’ve been using those demos, plus Bunnymark-style stress tests, to validate wrapper coverage, script dispatch, hot reload, and runtime performance.
The project is still early stage and I would not consider it production ready. If you need an established Kotlin integration for Godot today, you should also look at Godot Kotlin/JVM. Kanama is a separate approach built around stock Godot + GDExtension + Panama/FFM.
Links:
- Project docs: Kanama
- Kanama: GitHub - falcon4ever/kanama: Kanama brings Kotlin to Godot through a GDExtension runtime powered by the JVM and the Foreign Function & Memory API. · GitHub
- Kanama demos: GitHub - falcon4ever/kanama-demos: Godot demo projects ported from GDScript to Kotlin with Kanama · GitHub
The project is licensed under MIT.
Plan is to have to make it available in the asset store when things are a bit more stable.