Commit Graph
14 Commits
Author SHA1 Message Date
waozi f4bda47333 Preserve module paths and release hosted input borrows 2026-11-27 17:33:38 -03:00
waozi e2b0fbd891 Migrate Kryon UI composition to typed native TSX
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.
2026-11-27 14:24:19 -03:00
waozi 3fc3349612 Bind Android program entries through the public import 2026-11-26 21:10:09 -03:00
waozi ad43e92a58 Fix plain program entry bridges for native builds 2026-11-25 19:18:09 -03:00
waozi 09664f076d Remove the program-export program entry; main is the only entry
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.
2026-11-25 05:56:17 -03:00
waozi fc3ebecda7 Build Android's native link from the checked import graph
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.
2026-11-23 07:47:29 -03:00
waozi b5a61b37df Fix Kryon build regressions and consolidate checks
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.
2026-11-18 01:52:02 -03:00
waoziandClaude Opus 5.5 e05146b3ba Host Android apps that run their own frame loop
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]>
2026-11-17 13:30:41 -03:00
waozi 3ac259c4c2 Generate Android sources for the Android target 2026-11-13 18:07:38 -03:00
waozi b08079641f Keep Android loader entries in generated native graphs
`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.
2026-11-13 17:20:59 -03:00
waozi e8c6aa25c1 Integrate components and the public UI surface 2026-11-10 15:37:48 +00:00
waozi cb637eabcd Use ZX portable executables throughout players and project tools 2026-10-23 18:55:42 -03:00
waozi f4f7320864 Render portable ZIB apps on native, web and Android hosts 2026-10-18 16:51:54 -03:00
waozi 214415b321 Add a first-class Android target as an installable APK
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.
2026-10-08 03:18:27 -03:00