Skip to content

Feat: native-image hello-awtfree, a window with no ComposeWindow and no java.awt - #42

Closed
b-re-w wants to merge 1 commit into
extendedfrom
feat/native-image-hello-awtfree
Closed

b-re-w wants to merge 1 commit into
extendedfrom
feat/native-image-hello-awtfree

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 4, 2026

Copy link
Copy Markdown
Member

Closes #23.

New sample extended/native-image/hello-awtfree. main() builds a ComposeWindowHost (core-extended extended/window/scene, PR thisisthepy/compose-multiplatform-core-extended#60) over AppKitWindowPlatform (graalvm-macos) or X11Window (graalvm-linux), chosen by the build OS. Frames go through skiko: Metal on macOS, GL on Linux; the Metal and GL WindowSurface classes are in src/mac and src/linux. No ComposeWindow, no java.awt in the sample's own sources.

HELLO_SELF_CHECK=: draws 30 frames, writes frames= and mismatched= (every presented frame must be drawn at the window size at present time), exits 1 on any mismatch.

Depends on the window modules in mavenLocal (org.thisisthepy.compose.window:{common,scene,graalvm-macos|graalvm-linux}:0.1.0). The windowing = AwtFree DSL line follows the plugin spine (#17).

Inherited upstream workflows fail at Setup Prerequisites (Android SDK) and are not the gate.

…no java.awt

Closes #23. The window is core-extended's WindowPlatform (graalvm-macos or graalvm-linux),
the scene is hosted by the window scene module, and skiko draws into the window's surface:
Metal on macOS, GL on Linux. HELLO_SELF_CHECK runs 30 frames and fails if any presented
frame was drawn at a size other than the window's.
@b-re-w

b-re-w commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Being taken over: its Metal and GL WindowSurface classes go into the core fork's graalvm-macos and graalvm-linux modules, and hello-awtfree (now the one-executable gate's sample, #49) moves onto ComposeWindowHost / runComposeWindow with this PR's Content. That needs the fork's Compose under org.thisisthepy (core JetBrains#119) first. This PR is closed with links once that lands.

@b-re-w

b-re-w commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

Superseded. Its parts landed as follows. The Metal and GL WindowSurface classes are now appKitWindowSurface / MetalWindowSurface in graalvm-macos and x11WindowSurface / GlWindowSurface in graalvm-linux (thisisthepy/compose-multiplatform-core-extended#138). The Compose content and the ComposeWindowHost loop are hello-awtfree, now the one-executable gate's sample (#58, merge 0405a75). The frames self-check is kept and now asks for 30 frames in a row. The scene's main dispatcher, needed for it to start in an AWT-free image, is in core JetBrains#142.

@b-re-w b-re-w closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant