kotlin-desktop-toolkit
AGENTS.md201 starsChanged 6 months agoApache-2.0View on GitHub
In this repository2 other files it gives its agents.
- native/desktop-win32/docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
The file
We found no rules to list in this file: it reads as prose or reference rather than instructions.
Files
AGENTS.md
This file provides guidance to Claude Code (claude.ai/code) and Codex (Codex.ai/code) when working with code in this repository.
Build and Development Commands
Core Commands
./gradlew build- Build the entire project including Rust native libraries and Java/Kotlin code./gradlew test- Run JUnit tests with native library dependencies./gradlew lint- Run ktlint for Kotlin and clippy/cargo fmt for Rust code./gradlew autofix- Auto-format code with ktlint and cargo fmt, apply clippy fixes
Native Compilation
The project uses Rust for native implementations and requires platform-specific compilation:
./gradlew compileNative-<target>-<profile>- Compile native code for specific platform/profile- Profiles:
dev(debug) andrelease - Enable cross-compilation via gradle.properties flags like
enableCrossCompileToLinuxX86_64=true
Sample Applications
./gradlew :sample:runSkikoSampleMac- Run macOS Skiko sample app./gradlew :sample:runApplicationMenuSampleMac- Run macOS Application Menu sample./gradlew :sample:runSkikoSampleLinux- Run Linux Wayland sample app./gradlew :sample:runSkikoSampleWin32- Run Windows sample app
Packaging
./gradlew :sample:jpackage- Create macOS .app bundle atsample/build/dist/SkikoSample.app./gradlew :sample:runPackagedMac- Package and launch the macOS .app bundle- The packaged app includes native libraries, JRE, and proper Info.plist with bundle identifier
Architecture Overview
Multi-Platform Structure
This is a Kotlin/Rust hybrid project providing desktop window management APIs for macOS, Linux (Wayland), and Windows:
- kotlin-desktop-toolkit/ - Main Kotlin API with platform-specific implementations in
org.jetbrains.desktop.{macos,linux,win32} - native/ - Rust workspace with platform-specific crates:
desktop-common/- Shared Rust utilitiesdesktop-macos/- macOS native implementationdesktop-linux/- Linux/Wayland native implementationdesktop-win32/- Windows native implementation. Has a per-crate doc set atnative/desktop-win32/docs/— start withAGENTS.md; covers architecture, FFI conventions, subsystem reference, and known issues. Treat that doc set as the canonical reference for the Win32 internals; the top-level AGENTS.md is a thin index by comparison.
Platform Bindings
- Uses JExtract to generate Java bindings from Rust C headers
- Native libraries are compiled per platform and packaged into platform-specific JARs
- Each platform provides distinct APIs reflecting OS differences (non-goal to unify APIs)
Key Components per Platform
- Application: Event loop management, screen listing, application lifecycle
- Window: Creation, positioning, sizing, rendering surface setup
- Events: Keyboard, mouse, window lifecycle events
- Rendering: Metal (macOS), OpenGL/Software (Linux), ANGLE (Windows)
- System Integration: Clipboard, drag-and-drop, appearance/theming, notifications (macOS)
Cross-Compilation Settings
Platform builds are controlled via gradle.properties flags. Only enabled platforms are compiled during build.
Testing
- Tests require native library compilation for the host platform
- Each test class runs in separate JVM with native access enabled
- Native debug logging can be enabled with
kdt.debug=truesystem property
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

