Expose the native widget surface through ordinary typed TSX components and enforce application composition at generic export and entry boundaries. Migrate maintained screens, scaffolds, gallery publication and editor transport through the common checked IR path. Preserve native logic, retained component state, input and platform hosts; remove the pixmap application route.
Local validation: complete make push-check passed with published Ziran dc3ecf0a, including docs, public source/saved surface, private-display desktop input, native host links and Canvas input parity. Fresh CLI/player/desktop library installed and byte-verified. The full migration matrix records remaining owning suites, published consumer pins, platform runs and Alpha benchmarks; this is a source milestone, not completion of the full campaign.
main is the only program entry. Frame stays an ordinary function that apps pass to App.Run; the frame-entry export mechanism (frame_entry, ProjectFrame binds, KRYON_FRAME_ENTRY, *_run.zi hosts) is gone. The pixmap, dom, terminal, zx and android frame loops are now frames_*.zi modules that App.Run selects. Consumer tests and fixtures build their own shot programs through the kryon package exports, and the desktop project probe imports Window explicitly. General #program_export component exports stay.
The Android host no longer needs the scaffold to pass WebP, AVIF and libaom
source directories. The generated link follows the application's imports:
Android's own image decoder serves the Image widget by default,
`kryon/android_avif` adds a dav1d decoder (libaom only when the app imports
AVIF encoding or the libaom engine) and `kryon/android_webp` adds libwebp's
first-frame decoder. Packages declare their native recipes and source
aliases under [tool.android.native].
Android text and emoji come from the system unless `bundled_fonts = true`.
`frame_mode = "events"` sleeps between updates and paces active frames with
the display; `kryon/android_frames` exposes AndroidRequestFrame for worker
and timed wakeups. Adaptive pacing remains the default, and a debug frame
watch reports stalled window-loop work.
The droid scaffold upgrades known stock Gradle, CMake and Activity files and
preserves customized ones, and needs Python 3.11. Pin the avif, webp and
audio packages and Ziran c041afb6, relocked from the pinned packages.
Select Darwin host code for the native ZX player and keep its Linux socket
service on Linux. Feed RGB to the JPEG encoder and retain Android
notification callbacks when generating native host libraries.
Resolve the Pages gallery verifier against the same source revisions as the
build. Reuse prepared template dependencies and check the JavaScript policy
against files present in the checkout. Combine related text-input checks
and perform shared source policy checks once per CI run.
kryon/android_runtime keeps NativeActivity lifecycle and input in the host
while the application's main owns its loop, widgets and pacing:
PollAndroidHost, BeginAndroidFrame and EndAndroidFrame present Pixmap's
device-pixel damage. The host calls the application's C main by symbol, so
generated C never declares main with Ziran's argument types. Pixmap's
RasterSetTransform and RasterPointFromPixels share one camera for painting
and input.
kryon/pixmap_assets_android decodes owned PNG, WebP and AVIF pictures on
first use, and kryon/pixmap_typefaces_android shapes text with Android Paint
and Canvas through the ordinary typeface_source capabilities.
The renderer-desktop artifact also builds Android ARMv7 and AArch64 codec
archives and the shared AVIF bridge, pinned to AVIF 2611e727.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
`ziran ir --entry main:main` keeps only what main reaches, so the glue's
JNI_OnLoad, android_fopen's __wrap_fopen/__wrap_fopen64 and a ZX player's
android_main were pruned: libmain.map.txt then failed with "symbol not
defined" for JNI_OnLoad and --wrap=fopen left __wrap_fopen undefined.
The generator now selects the graph through a generated root that forwards
to the stable main(argc, argv) and names the loader entries only on a
negative-argc branch, binding Kryon's entries as host capabilities. The
root never enters the C inputs. The source generation test now uses a
real JNI_OnLoad glue, checks the generated C defines every loader entry,
and links native and ZX graphs through kryon_android_app and
kryon_android_host with the canonical export map.
An android profile now builds a real Android application from the same
sources as the desktop: the kryon tool scaffolds a droid/ Gradle project
beside the application on the first build and assembles a debug APK with
the NDK. The canonical host (android_run) drives the session over
raylib's NativeActivity backend with the shared viewport policies; a
generated NativeActivity reports insets, cutouts, IME state, density,
dark mode and orientation through JNI natives written in Ziran, forwards
soft-keyboard text through the session-owned input queue, and an
unconsumed back key finishes the activity. Generation runs the whole Zi
graph through ziran ir --project so application module names may repeat
Kryon module names.