Skip to content

Feat: Link a skiko built without JAWT into the macOS native image - #193

Merged
b-re-w merged 10 commits into
developfrom
feat/awt-free-native-image
Oct 5, 2026
Merged

b-re-w merged 10 commits into
developfrom
feat/awt-free-native-image

Conversation

@b-re-w

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

Copy link
Copy Markdown
Member

Reopens #168 against develop: its base branch (feat/fork-window-integration, #165) was merged and deleted, which closed it.

Links the fork's extended/skiko static archive built with --no-jawt plus Skia's archives into the macOS GraalVM image, drops the AWT shims (macos_awt_compat, the libjawt and libawt_lwawt forwarders), generates the foreign-entry-point stubs from a first link, and adds image-has-no-awt.test.sh to the GraalVM workflow (NFR-14). develop is merged in; it had already dropped the AWT archive force-load and the accessibility class roots.

Linux is not changed here (develop's build-native-linux.sh handles it). Never built locally; CI is the first run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S4U9VPRip4QwbE57nj2Y4x

b-re-w added 9 commits October 5, 2026 00:48
…nd drop the AWT shims (NFR-14)

The macOS native image links the static skiko from the fork's extended/skiko build, made with
--no-jawt, and Skia's own archives, so nothing of the toolkit is linked or shipped for Skia's
sake: the AWT force-load, the Objective-C accessibility class roots and the libjawt and
libawt_lwawt forwarders are gone. The foreign-entry-point stubs are generated from a first link.
image-has-no-awt.test.sh scans the linked image for AWT libraries and symbols.
accessibility-link.test.sh is retired with the toolkit archive it checked; the window's own
accessibility is appkit_window.m's.

Linux still ships the toolkit's libraries and is not changed here.
…ve-image

# Conflicts:
#	.github/workflows/test-graalvm-renderer.yml
#	renderer/desktop/scripts/build-native.sh
…r find no foreign entry points

renderer-toolchain.test.sh requires env.sh to be the first statement, so a wrong toolchain is
reported before anything else runs. generate-foreign-stubs.sh ran under pipefail, so a link
with no undefined skiko entry points made grep exit 1 and stopped the build silently.
build-native.sh set dioxus.compose.staticSkiko, a name left from before the rename, so the
feature and the loader substitution stayed off and the image looked for libskiko beside it.
@b-re-w
b-re-w merged commit 65a6fc4 into develop Oct 5, 2026
21 checks passed
@b-re-w
b-re-w deleted the feat/awt-free-native-image branch October 5, 2026 10:32
b-re-w added a commit that referenced this pull request Oct 17, 2026
… Compose's main-thread work in the Win32 frame loop

The Windows image ran Compose's main-thread work on Swing
(kotlinx.coroutines.swing.Swing, compose.main.dispatcher=unset, run
39014707510) and carried the whole AWT stack, now that it opens its own
window by default. As the macOS and Linux images do (#193, #204, #205,
#208 to #210):
- the Win32 branch sets java.awt.headless, installs FrameMainDispatcher,
  and the frame loop and the resize frame run its pending work first;
- the scene gets the window's own clipboard, as NativeWindowContent gives
  the AppKit and X11 windows;
- build-native-windows.ps1 builds with -Ddxc.toolkit.window=false,
  -Dcompose.awt=false and -Ddxc.awt.clipboard=false, forbids
  java.awt.Toolkit and java.awt.Component, leaves kotlinx-coroutines-swing
  off the class path, drops the ImeReachabilityFeature, the preserved
  java.desktop module and the toolkit's reachability metadata (kept for
  the development shell), removes the toolkit libraries Native Image
  stages, and puts a stub jawt.dll (win32_jawt_stub.c) beside skiko's
  library when that library imports it;
- windows-build-contract.test.sh states the new contract.
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