Kryon no longer includes raylib: apps use the SDL2/Cairo desktop host, the
Canvas host and the NativeActivity host, with Ziran's core audio natively
and WebAudio in browsers. The desktop host gains what terminal-style apps
used raylib for: descriptor-aware waiting, window options, frame rate, an
exit key, the middle button, fullscreen and glyph preparation. The
changelog section lists what users get. VERSION follows the new section,
as update_version.sh sets it.
The SDL2/Cairo desktop host gains what kryonlabs/terminal and Harmony's
terminal need to leave kryon/Raylib:
- kryon/desktop_activity: DesktopWaitForActivity(descriptors, ms) sleeps
until a program descriptor such as a PTY is readable, window input is
queued, or the time ends, leaving queued input for PollDesktop. Windows,
web and Android report DesktopActivityUnsupported.
- OpenDesktopWindow(width, height, title, options) with resizable,
undecorated, topmost and always-run windows; OpenDesktopTitled stays the
resizable window.
- DesktopFrameRate(fps) paces the frame clock, 0 drawing without waiting;
a stable screen never settles faster than the configured rate.
- DesktopExitKey(key), PollMiddlePointer(), DesktopSetFullscreen,
DesktopToggleFullscreen, DesktopFullscreen and DesktopPrepareGlyphs.
tests/ziran_desktop_host_gaps_test.sh covers each on a private Xvfb, from
source and saved IR.
Kryon carries no raylib code. The ten raylib host modules, the raylib
ZX player, the raylib audio sink and media provider, their tests and
docs, mk/raylib-library.mk, mk/zx-raylib.mk, mk/raylib-shell.html,
cmake/renderer-artifact, the renderer-raylib artifact, the
`backend = "raylib"` profile and [dependencies.raylib] are gone.
Desktop, Android and Canvas hosts keep the shared image, shader and
audio coverage. Browser asset and PCM audio play through
media_audio_web on the Canvas WebAudio engine; native audio uses
Ziran's core audio modules through media_audio_desktop.
macOS CI builds the desktop ZX player and checks the headless bundle
with it. The toolchain moves to Ziran 7fbc8152, which carries the
optimizer fixes the tree-input test needs. All 99 example locks are
regenerated as CI resolves them, without raylib.
The hosts job's desktop Vorbis test stopped at configure: libvorbis
1.3.7 asks for CMake 2.8, and CMake 4 refuses compatibility below 3.5.
Pass CMAKE_POLICY_VERSION_MINIMUM=3.5 to that configure; earlier CMake
ignores the variable.
Local tests: under CMake 4.1.2 the configure fails without the floor and
passes with it, and make desktop-audio-vorbis-test passes with CMake 4
and with the host's 3.31.
Android Frame apps draw through Pixmap, which found only pictures already
registered, so every file picture showed "Missing image". Pixmap now asks
an optional picture source the first time it measures or draws an
unregistered path, once per missing path until invalidation or host
cleanup. pixmap_assets_android registers a source that reads the APK asset
through AAssetManager and decodes it, and the Frame host imports it, as
desktop Cairo loads pictures on first use.
Tests: the Android image services test covers lazy loading, caching, the
single lookup per missing path, retry after invalidation and cleanup. A
new device suite decodes a framework PNG through Android's real
AssetManager inside its VM and compares it with an independent decode;
tests/android_vm_device_test.py now runs it and the typeface suite. Frame
host tests link the codecs that apps link.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Desktop hosts decoded AVIF only through a loaded libkryonavif and WebP
only through the system libwebp. Built with KRYON_AVIF_LINKED, AvifInit
binds the avif package's static bridge to the libavif the program
links; built with KRYON_WEBP_LINKED, WebPInit binds webp_linked's table
of the program's libwebp and libwebpdemux. Neither loads a library.
avif_decode_test.sh builds linked_codecs_test with the static libavif,
libaom and libwebp archives and runs it where no libkryonavif exists. It
checks AVIF and WebP pixels from bytes and from files, and that neither
libkryonavif nor libwebp was mapped.
Local tests: the linked build passes; the same test built without the
two defines fails.
Fonts registered from bytes and pictures from a program's asset reader
became Linux in-memory files opened through /proc/self/fd, which MinGW
cannot link. cairo_assets now takes its files from asset_files_linux
(memfd, as before) or asset_files_windows, which writes each asset to a
file of its own in the user's temporary folder by an ASCII path and
removes it when it is closed or when the program exits.
windows_desktop_test.py runs a new Wine program, linked with -lws2_32,
that draws text in a font given as bytes, decodes a picture given as
bytes, calls Winsock's connect beside the image decoders, and leaves no
temporary files behind.
Local tests: the whole Windows desktop suite passes under Wine on a
private display, and the Linux desktop windows test still reads
embedded pictures and fonts from in-memory files.
ziran_image_decode's loader slots were public C globals, and one was
named connect. A Windows program that links ws2_32 for its own sockets,
such as one using curl, met that symbol in place of Winsock's connect.
The slots are now file-scoped, so C gives them internal linkage, and the
signal slot is named signal_connect.
Local tests: the generated C declares static Connect signal_connect; the
GdkPixbuf decode test passes on Linux, and the new Wine assets test
(next commit) calls Winsock's connect beside the decoders.
kryon/scene_skin gives scenes indexed surfaces with four-influence
skinning that always deforms from bind data. kryon/watercolor samples real
paper and pigment bitmaps with soft light and a Fresnel rim, and its
finishing pass adds brush regions, paper grain, pigment pooling and pencil
contours while keeping alpha exact. Both run on the CPU renderer and the
translated GLES path. Desktop LoadImagePixels accepts an optional host path
resolver so bundled assets decode like disk images.
Use Android's default EGL display and preserve its current context without
importing desktop GLX or newer EGL platform entry points. Link EGL and GLESv3
through the shared Android CMake helper.
Add strict API21 NativeActivity link coverage for both ARM ABIs, rejecting
GLX/newer EGL symbols and requiring the real Android/EGL entry points.
Document the Android generation and link requirements.
Local tests: both-ABI NativeActivity links passed; build-queue -- make push-check
passed, including desktop host, gamepad, text-hook and pixmap GPU coverage.
kryon/image brings file pictures since 15c3a22e, so a program that
imports it links a host's ImageWidth and ImageHeight. Jungle's story
layout test uses only ImageFitBounds and ImagePreviewSource and no
longer linked. Export image_behavior for code that needs only the rules.
Local tests: a package consumer using kryon/image_behavior links and runs
without a host; the same program with kryon/image reproduces the
undefined ImageWidth and ImageHeight.
24b476c3 bounded this phase at 1200s. GitHub runners compile each of
the 101 sources in about 14s, about 24 minutes in all, so the bound
stopped correct runs partway through. Allow 2400s, and 45 minutes for
the Pages step; compile_ready still bounds each compile to 120s.
Local tests: make site-browser-test passed (this phase took 871s).
Since 2d608291 a negative source width mirrors the rectangle that
starts at x. The scene's {16, 0, -16, 16} therefore sampled beside its
16-pixel picture, and the SDL3 GPU renderer's image clip check failed.
Local tests: make sdl3-test passed on a private Xvfb.
A program entry that exports main also got the generated
kryon_program_host main, so wasm-ld stopped at "duplicate symbol: main"
for the canvas page. Detect main's own #program_export and compile the
entry directly; an unexported main still gets the generated host. A zx
profile bundles the program's main since 0c6f138e, so the test checks
that bundle instead of a refusal.
Local tests: make program-entry-project-test passed (Window and Hello
canvas pages, desktop window, zx bundle).
Apple ld rejects --gc-sections, so the macOS player link failed. Use
-dead_strip on Darwin, where the player links no X11, and keep
--gc-sections elsewhere. The display-free headless test runs only the
VM, so it no longer builds the desktop player first.
Local tests: the Darwin link line (make -n) has -dead_strip and no
--gc-sections, Linux keeps --gc-sections, and push-check passed.
Ziran 2313b49c lowers std Sqrt to C sqrt(), so test scripts that link
generated C with cc directly stopped at "undefined reference to sqrt":
45 behavior tests in the check and sanitizer jobs. Add -lm to those link
lines and to the shared matrix helpers.
Local tests: all 45 failing scripts pass.
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]>
SystemPaletteApply installs a system palette as style rules and as the
active theme's colours, so code that draws from CurrentPalette() matches
the host as well as styled widgets. SystemPaletteUpdate applies a palette
only when it changed; SystemPaletteFollow in SystemThemeHostLinux and in
the portable SystemThemeHost feeds it each frame, so ZX apps such as
Harmony's Telegram follow a host's theme change with one call.
The parent-theme test checks CurrentPalette() after a followed change.
SystemTheme.SystemPaletteColors(palette) builds a complete theme Palette
from a system palette such as the one Harmony gives an embedded app: its
background, surface, text, accent and border, and surfaces, text levels,
borders, selection and controls mixed from them, so an app that draws
from a theme palette matches its host completely.
The parent-theme test checks the expanded palette after a host change.
SystemThemeHostLinux.SystemPaletteFollow() installs the current palette,
the host's while an app is embedded, the first time and again whenever
the host changes it, and returns true when it installed. An app that calls
it once per frame follows a theme change in Harmony's Sessions window
without colour code of its own.
The parent-theme test gains a follow scenario: one install, none while
unchanged, and one after each host change. Both theme tests now link libm,
which the style sheet code needs.
Use the platform-selected asynchronous std audio sink and core mixer,
remove the six moved Kryon audio modules and exports, and select their
published compiler and optional Opus package pins. Add actual Moto UI
PCM source/saved validation and retain deterministic device-failure tests.
Local tests: desktop PCM/MP3/Vorbis, Windows Wine host and audio,
Moto source/saved UI PCM, ziran check and push-check passed. The full
shared-tree test stopped at the separately owned Canvas program-entry
title/boot test; this commit has no program-entry or title changes.
Report each browser test phase and source example, interrupt blocked I/O, and bound the Pages test step. Verify deadlines with blocked read and full request pipe tests.
Add exact/folder/all picture cache invalidation, shared oriented preview
pixels, and owned previous-frame snapshots for desktop and NativeActivity.
Keep alpha and row orientation through Image transitions, including negative
camera origins. Capture desktop frames after presentation and preserve Android
pixels until the route finishes composing. Web returns an invalid snapshot.
Local tests cover source/saved desktop and Android pixels, Windows/Wine
snapshots, native image previews, Canvas browser/Wasm, Android NDK host links,
frame transition behavior, bitmap ownership, and push-check.
Known upstream gap: published Ziran ebd19223 rejects the portable bitmap Image
test in PixmapGpuCorners with assembly.gap.machine-copy. Reproduced unchanged
on origin/master 216c190c: function 300, block 5978, instruction 27407.
The native C control passes. See plans/2026-11-16-remove-raylib.md.
Remove raylib paths, obsolete import and preview guidance, migration prose,
and orphaned documents/pages. Align widget imports, native ZX windows and
host contracts with the current implementation, and enforce current site routes.
Keep outside releases blocked by default while allowing Escape to close the top modal. Preserve dismiss_disabled as the explicit override for both routes, including through the portable widget host.
Run the headless, media/HTTP, hosted-app and native interaction gates
through zx-player instead of the raylib player. Use the shared bundle
media and app lifecycles for packed resources, private documents, input
and scrolling. Play native bundle audio through the SDL mixer and the
package-owned codec archive. Separate normal completion from VM failure
and preserve candidate-media isolation during live reload.
Keep the raylib host modules and their own test target for the separate
deletion. Keep shared BundleApp byte APIs and desktop locale behavior.
Local tests: the four assigned ZX gates, source/saved VM and native
interaction, browser media and hosted apps, completion/trap status,
reload, zx2native window host, retained raylib player/media and
push-check passed through build-queue on private displays.
Owner-request: Waozi, 2026-11-16 (remove raylib dependencies)
Move Opus transport to the shared mixer and SDL sink, query SDL keyboard
focus, and decode/export encoded images without the raylib host. Give
the canvas host its own clip implementation and remove unused C ABI
exports in favor of direct canvas Files imports. Retain the public host
APIs and the raylib host modules for their separate deletion.
Local tests: native-image-services-test, desktop-audio-test,
image_dynamic_integration (source/saved IR, ASan/UBSan/leaks), background
image jobs, complete canvas-test, and push-check passed via build-queue.
Owner-request: Waozi, 2026-11-16 (remove raylib dependencies)
Add Windows platform adapters, a pinned MinGW desktop renderer artifact,
and private Wine pixel/service/audio tests. Share raster and window code
while selecting native process and library-loading modules per OS.
Pin the public WebP native function-table export for dynamic decoding.
Local tests: windows-desktop-host-test, desktop-windows-test,
desktop-audio-test, native-text-test, native-accessibility-test,
image-pixels-test, pay-per-import-test and push-check passed. Strict
dynamic image source/saved IR passed ASan, UBSan and leak detection.
The stock frame-entry C pruning and Windows ZX external-host gaps remain
upstream in step 6. Full make test separately stops at ZX packed media.
This checkpoint does not include consumer ports or macOS builds.
Signed-off-by: Waozi <[email protected]>
Run the extracted Diary editor and preview through C, Go and ZX, including identical source and saved-IR bundles.
Local tests: markdown-editor-test full matrix and make push-check passed.
Move WebP/AVIF/AOM recipes into mk/codecs.mk and build Opus from the
package-owned audio recipe. Publish all four archives, licenses and the
lazy AVIF library through renderer-desktop. Keep the raylib host recipe
using the same codec targets until its separate deletion.
Local tests: codec-archives, renderer-consumer-test,
desktop-codec-artifact-test (real source/saved-IR AVIF/WebP/Opus), and
renderer-artifact-test including the retained native renderer on Xvfb.
Owner-request: Waozi, 2026-11-16 (remove raylib dependencies)
Keep GetAndroidApp inside the raylib host; native JNI uses native_app_glue startup and clears the app on shutdown. Exercise publication and cleanup with the source and saved-IR JNI thread tests.
Owner-request: Waozi, 2026-11-16 (remove raylib dependencies)
A program entry (one that declares main) was refused in any profile but
codegen c99, so window.zi's ZX could not run in a page. A codegen = "zx"
profile now bundles the program's own main with portable IR, which
kryon/app gives the zx_window window; no generated program host is made.
In the page the ZX canvas player runs such a bundle through
window_page_player.zi: it binds zx_window's five capabilities to the page's
canvas with page_core, as page_window does for a C program, lowers the
bundle to Wasm in the page and runs main until the page closes. Each wait
for an event sleeps, which yields to the page, so the program's own loop
never blocks it. zx_window_bundle.zi holds the capability check both
players use. The editor's Wasm platform opens window.zi this way, and its
browser test checks that the page's canvas is cleared to the frame colour.
window.zi's bundle asks its host for five zx_window capabilities. The
desktop zx player binds them in-process for `ziran run`, but a native
executable from zx2native had no host to call, so the editor's Native
Assembly and Binary stopped at assembly.gap.machine-host.
zx_window_host.zi exports the five capabilities with the C ABI the C
target gives zx_window's declarations, over the same desktop_window SDL
window. `make zx-window-host` builds build/lib/libkryon-desktop.so from it
alone, and `make install-user` installs it to ~/.local/lib/kryon and
registers ~/.local/share/ziran/hosts/kryon-desktop.library, so zx2native
links window.zx into a Linux executable that opens its 320x160 "Window"
in the empty frame's colour and exits 0 when it closes.
zx_window_test runs both routes on a private Xvfb, the player through
`ziran run` and the executable directly, and checks that with no library
registered zx2native stops at the gap naming ZxWindowOpenHost.
Kryon builds with Ziran 0.6.0 and runs its widgets natively 121–185× faster, programs carry only the features they use, widgets are imported by package, portable apps run their window from a bundle, and the Linux desktop host gains audio and a raylib-free window path; the changelog section lists what users get. update_version.sh set VERSION from the new section.
The codec generator names hosted records by their defining package since 9ca2e673, but src/backend/media_audio_codec.zi was not regenerated, so media_audio_test's --check stopped the hosts shard. The website's staging step copied only tracked docs/site files, so a freshly built runtime asset (asset-13.bin once the mascot joined the gallery assets) was never deployed and the Website check could not find pfp.webp; it now also stages every asset the build's runtime/assets.json lists.
Pin the root package and the box, gallery and image examples to the Ziran v0.6.0 release commit d17c7aa1 (by commit, since ziran lock records an annotated tag's object rather than its commit). The gallery lock is regenerated: it pinned image-codec and webp at their master commits while webp declares image-codec 3605531, so ziran pkg path plot --locked failed and the website build stopped.
Describe nominal host types with their defining module and generate widget
wire names from the same declaration identity. Match package-qualified
records and slices through the shared hosted-value matcher, retaining
module and package mismatch rejection.
Add a separate package-consumer host regression and negative identity
cases. Pin the canonical type producer from Ziran.
Local tests: widget host, widget codec, component host, and all six hosted
tests pass. Ziran portable records, slices, arrays, capabilities, payloads,
web lifecycle and bootstrap checks pass. Broader checks have unrelated
shared-checkout failures reported separately.
Reported-by: Breeze task codex-breeze-breeze-crash-recovery-ui
Expose byte-preserving Markdown formatting and TextArea composition as optional
package imports for Breeze Diary. Wire native and portable editor behavior
coverage into make test and test-focus, and document the public surface.
Signed-off-by: Waozi <[email protected]>
ziran_test_driver_host imports text_input_platform_host but never uses it.
After the pay-per-import split the toast scratch project fails ziran ir
because that module is not in its package root. A toast has no editable
text, so the driver does not need text input; remove the import.
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
tests/ziran_test_driver_host.zi imports text_input_platform_host, but the test copied only itself and the driver host into its scratch project, so ziran ir --project failed once the hosts shard reached it.
Like the GTK scroll test, tests/file_date_linux_test.py wrapped its compiler calls in build-queue, which CI runners do not have; it now uses build-queue only when it is installed.
tests/gtk_scroll_linux_test.py wrapped its compiler calls in build-queue, which only the developer machines have, so the hosts shard failed with "No such file or directory: 'build-queue'" once it got that far. It now uses build-queue only when it is installed.
raylib-window-test links neither raylib nor SDL: tests/raylib_window_host.zi
stands in for raylib's SDL platform and already exports the SDL calls the
Linux host makes. 631f15e7 had OpenRaylib set SDL_SetHint, which the
probe lacked, so the test no longer linked. The probe now counts requests
for a linear framebuffer made before a window opens, and the test checks
OpenRaylib makes one on Linux and none on Windows or macOS. raylib_runtime
is unchanged: on Linux Kryon always builds raylib's PLATFORM_DESKTOP_SDL,
and the hint shares the platform branch of the host's other SDL calls.
site_browser_test reloaded the page and evaluated Module straight away.
Page.reload answers before the new document has run current.js, so on a
slow runner the evaluation reached a document without Module and threw
"ReferenceError: Module is not defined"; the failure screenshot of the
half-loaded page then read as blank paint. With current.js served 300 ms
late, that sequence failed 10 times in 10. Browser.reload marks the old
document and waits for an unmarked one to finish loading, as open does
after a navigation.
An app that Harmony embeds now draws in Harmony's theme without code of
its own. SystemThemeLinux.SystemPaletteRead returns the palette the host
keeps on the window it embeds the app in, after checking that the named
host is the app's parent and owns that window, and reads it again on each
call so an app that reads it follows a theme change. Started on its own,
an app gets the desktop's GTK palette as before.
The reader moves out of SystemThemeHostLinux into ParentThemeLinux, which
SystemThemeHostLinux now reuses. It loads libX11 at run time and only when
a host is named, so apps that are never embedded, and Windows, Android and
web builds, need no X11.
A Ziran test plays the host on a private X display: the hosted palette is
returned and followed, an unknown version is ignored, and a host that is
not the app's parent gives no theme.
test_generated_project_uses_disposable_paths_and_xkb_sysroot now points
XKB_LIBRARY at a scratch fixture file, so it no longer needs
/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0. A new case checks that
write_project() rejects a missing library with a clear error.
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
The hosted native ZX test read (244,96,110) where its picture is
(230,30,40), and (252,253,254) for the 0xf8fafc background: the whole
window had been sRGB-encoded a second time. That gate ran with a private
SDK whose libSDL2 is sdl2-compat on SDL 3.4.2. SDL 3 gave raylib's
OpenGL ES context an sRGB-capable framebuffer, and Mesa encodes every
write to one. The system SDL 2 picks a linear visual, so the same player
drew exact colours without the SDK. OpenRaylib now sets
SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER=0 before InitWindow; SDL 3 then
requests a linear framebuffer and turns GL_FRAMEBUFFER_SRGB off, and
classic SDL 2 ignores the hint. Under that SDK the test finds the exact
colours again.
zx_window_test captured the window right after it mapped and sometimes
read X's black contents before the player presented its first frame. It
now waits up to 10 s for the presented frame and keeps the exact
single-colour assertion; the corner pixel is checked before the colour
count, so the wait does not build a 2 MB table every 20 ms.
Since 15c3a22e a toast no longer reaches pictures, so its bundle has no
image_raster:ImageWidth or ImageHeight capability, and binding them failed
("host capability or exported Ziran provider is missing or already
bound"), failing toast-action-test in the hosts shard. The bundle binds
only what the toast uses.
Since 15c3a22e kryon/image is image_files, which brings the file-picture
decoder and its ImageWidth and ImageHeight host capabilities. The bitmap
host policy test only names Image.Props, and its build has no picture
host, so it failed to link ("undefined reference to `ImageWidth'") and
bitmap-image-test failed. It imports kryon/image_props, as props-only code
does.
Since 9b551b59 a page makes smooth copies of file pictures only once it
asks a picture's size, as every widget that draws one does first and as
the desktop already did. tests/canvas_lanczos_test.zi drew its pictures
without asking, so no copy started and lanczos-goldens-test failed with
"Canvas Lanczos page: FAIL 20". It now asks each picture's width first.
pay-per-import-test built examples/box, button, image and textfield in
place, so it used their locks, which pin a published Kryon, or whatever a
developer's ziran.local.toml says. On a plain clone the locks did not match
this checkout's manifest ("declares image_codec ... but lock pins ..."),
and CI passed only because a CI step writes overrides into the examples.
The test now copies each example into build/test/pay-per-import/examples
with its own ziran.local.toml pointing kryon at this checkout and ziran at
the running toolchain, locks the copy and builds it there. The real
examples, their locks and any developer overrides are untouched.
The browser document storage page runs its hosted guest on Ziran's Wasm
tier, whose zx_wasm_web_call import unwinds through the page's stack. The
page links with ASYNCIFY and ASSERTIONS, and the import was not in
ASYNCIFY_IMPORTS, so the hosts shard aborted with "import zx_wasm_web_call
was not in ASYNCIFY_IMPORTS, but changed the state". It is now listed.
The desktop check read the name of the first window xdotool found for the
program and stopped. SDL sets the title just after creating the window, so
a search between the two read '' and the web shard failed with "expected
the program's window title, got ''". The check now keeps looking until a
window of the program has a name.
tests/gallery_modules_test.py gave the compiler kryon=src/ui and
kryon=src/backend, so the generated usage modules' imports such as
kryon/button (src/ui/button/button.zi) and kryon/button_group
(buttongroup/buttongroup.zi) were not found and the site shard failed.
Every configured package, Kryon included, now gets each manifest module
root plus the export alias modules gallery.export_aliases writes, which
import the sources through <package>_source.
e9017b29 made the activity method lookup release its class reference, and
the fake JNIEnvs in android_device_host.zi (also used by the text editor
test) and android_picker_behavior.zi had no DeleteLocalRef, so the
device, picker and text editor tests called a null function (exit 139;
ASan "SEGV on unknown address 0x0"). Both fakes now have one.
The canvas host's wheel event forwarded only its deltas, so the wheel went
to wherever the pointer last moved. A wheel turned without a move first,
as after clicking into the live editor, scrolled the editor instead of the
page under the wheel, and site_browser_test's overflow preview check timed
out with "overflow preview article scroll". The wheel now delivers its
own position as a pointer move before its deltas.
On a Java-free NativeActivity, Kryon's optional callbacks
(onNativeFirstFrame, setTextInputState, setSoftKeyboardVisible) do not
exist. AndroidJniMethod returned GetMethodID's null with the
NoSuchMethodError still pending, and the host thread now keeps its JNIEnv
across frames, so later JNI calls in the session ran with that exception.
The lookup now clears the exception it caused and releases the class
reference it took; AndroidJniCallVoid releases its string argument.
Exceptions that Java methods throw still make the call report failure and
are still described and cleared at detach.
tests/android_jni_threads_test.zi's fake JNIEnv now tracks pending
exceptions and local references, and checks all three absent methods, a
present call and a throwing one.
One shared WidgetHostSliceValid check, built on HostTypeValid, replaces the
six strict per-widget slice checks.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The preview entry imported kryon/cursor, the public cursor API that
registers the host's picture-cursor decoder, so every compiled preview
asked for CursorPictureHost and the website refused it ("Unavailable
preview capability: CursorPictureHost"). The preview only reports
TreeCursor's kind to the page, which kryon/tree_input already gives it.
The gallery's web build failed with "unknown record field: progress" and
"armed" in web.zi. web.zi reads site.zi's site_hold and site_confirm
through `using Site`, and their types name site.zi's module aliases
(HoldButton.HoldButtonState, ConfirmButton.ConfirmButtonState), which the
checker resolves in web.zi, where those aliases do not exist. site.zi now
exposes SiteHoldProgress and SiteConfirmArmed, and web.zi calls them.
The hosts shard's new report shows the 1x1 preview as RGBA 0 0 255 127 on
CI, where this machine gives 128. Half of the 2x1 source is transparent,
so the Lanczos alpha is exactly 127.5 and a last-bit difference in the
filter sums rounds it either way. The check now accepts 127 or 128; the
colour bytes stay exact.
74eb8fbb deleted tests/demo_browser.mjs: demo.html now redirects to the Canvas widgets page, whose editor make site-browser-test covers. The web shard's step that ran it is removed.
CI's sanitize shard failed this test on a reopen after CloseDesktop (exits
30, 33, 40, 61, 80 and 101). With the open failure now reported, the CI log
at 9401f34f shows SDL_Init failing with "x11 not available": closing the
window disconnected Xvfb's last client, Xvfb reset, and the reopen's
connection landed in the reset. A desktop's X server never resets that way,
so the test runs its Xvfb with -noreset, as ziran_window_visible_test.sh
and mime_clipboard_linux_test.py already do.
CI's hosts shard fails tests/image_avif_zi_test.sh with exit 4 and nothing
else, on the locked avif f26a5522 and Ziran v0.5.0; the same locked graph
passes here with gcc 14 and clang 19. Exit 4 covers an unsuccessful preview,
its size and its pixels. The 2-to-1 Lanczos alpha is exactly 127.5 here, so
one rounding step decides 127 or 128. The check now prints the preview's
error, or its size and RGBA bytes, so the next failing run shows which.
A program that runs DesktopLoop.Run with its own host imports
kryon/tree_frame and calls TreeFrameUse() so the widget tree runs each
frame. The test driver's pointer and wheel now apply once, in the frame
driver, instead of also in the desktop loop.
tests/demo_browser.mjs drove the DOM live editor at demo.html: its
#status line, iframe embeds and homepage link. The Canvas website redesign
made demo.html a redirect to the canvas widgets.html page, and 9ce47851
removed the matching gallery_browser.mjs, but this test stayed, so it
waited 25 seconds for an element that no page has and failed with
"Default source did not render" (state {}). Rebuilding the committed
playground runtime does not change that. tests/site_browser_test.py
(make site-browser-test) covers the Canvas site's editor compilation.
layout.zi and toolbar.zi imported the retained tree, session and paint
queue unconditionally, so a KRYON_HOSTED_UI bundle importing them failed.
Their retained halves now sit in the non-hosted branch, as menu.zi does;
the behavior and props stay available. pay-per-import-test bundles a
hosted program using both and checks it carries only layout_behavior and
toolbar_behavior. The retained examples' generated C differs only in
include and init order.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
OpenDesktopTitled returned false from five places without a word, so CI's
ziran_desktop_input_backpressure_test.sh failed a reopen with only its
exit code (30, 33, 40, 61, 80 or 101) and nothing to say which step or
why. Each failure now writes the step (starting SDL video, creating the
SDL window, renderer or texture, or the Cairo surface) and SDL_GetError()
to standard error.
The drag selection test dragged to x=110, past the end of "abcdefghij" with
the test host's 7-pixel glyphs, so its Shift+Right step started at the end of
the text and could not move. It now drags to x=80, leaving the caret inside
the text so Shift+Right extends it by one.
- mk/zx-raylib.mk generated Darwin private-symbol headers for a vm group
whose header Ziran 0.5.0 removed with its old VM; Ziran's build uses
only parse, check and emit.
- The hosts shard runs drag_source_linux_test.py, which needs python3-xlib.
- The gallery's lock pinned Plot 3f888653, which still imported the removed
kryon/Kryon facade, so the site and Pages web builds failed; `ziran
update plot` moves it to Plot's current master with its dependencies.
menu.zi imported the retained tree, tree input and paint queue
unconditionally, so a KRYON_HOSTED_UI bundle that imports kryon/menu
for its MenuItem, MenuGroup, Props and MenuState failed on TreeNextKey,
TreePrevious and the rest. The retained menu bar now sits in the
non-hosted branch; a hosted bundle carries only menu_props.
pay-per-import-test bundles a hosted program using the menu's types
and checks it carries exactly its own module and menu_props and asks
its host for nothing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
build_android_runtime.py ran Ziran's make with the NDK compiler and no
GEN_ZI2C, so the generated-C step would run a zi2c built for the device.
It now passes the pinned toolchain's build/bin/zi2c, which the Android
CMake already requires. The ZX player APK builds for all three ABIs and
runs app.zx natively on the Moto (armeabi-v7a).
The toolchain moves from e813c847 to Ziran v0.5.0 (f9f92b46) in Kryon and
the box, gallery and image examples, locked with `ziran lock`. 0.5.0
builds on macOS again and its browser playground builds, which Kryon's
macOS job, site build and Pages preview need.
tests/android_frame_pixels_test.zi sizes its pbuffer surface through
raylib's CORE.Window record, whose overlay left android_surface.zi on
Nov 10; the test now declares the overlay it uses.
The pay-per-import test builds examples/button and examples/textfield as
applications of this checkout, so CI gives them the same overrides as box,
image and gallery.
The renderer and SDL3 providers never read Kryon's top-level Makefile, and
Ziran refuses to publish an artifact whose inputs change while it builds.
Any edit to the Makefile during a downstream build under a local Kryon
override therefore failed that project's native link. A consumer test now
checks each recipe's inputs against the make fragments its provider reads.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
audio_decode_vorbis adds Ogg Vorbis to audio_mixer by import, streamed at
the stream's own rate through audio/vorbis, which audio ce5837f8 adds over a
pinned stb_vorbis; Kryon now pins that audio commit. make builds the audio
package's libziran_vorbis.a for the programs that link it.
tests/desktop_audio_vorbis_test.zi checks the mixer's frames against
audio/vorbis's own decode of the package's fixtures, a 22.05 kHz stream's
length at 48 kHz, and a Vorbis clip through Kryon's asset audio.
A ZX build of kryon/app shows its window through zx_window: five host
capabilities (open, next event, clear, present, close) and the bundle's
own loop until the window closes. window.zi's bundle is window, app and
zx_window, with no frame, font or text code. The desktop zx player binds
those capabilities to desktop_window, now split into the same SDL steps,
and runs the bundle's main as native code with no engine fallback, so
`ziran run window.zx` opens one 320x160 "Window" in the empty frame's
colour and exits 0 when it closes.
make zx-window-test checks that on a private Xvfb; make
pay-per-import-test checks the bundle's exact modules and host
capabilities and its checked program.
A zx bundle's kryon/bitmap_image now asks its player to create, update and
release the picture (kryon build defines KRYON_ZX for zx profiles), and the
desktop zx player keeps it in its own bitmap store for the session it runs,
so its raster draws it like any other image. Before, a bundle's runtime
texture was unknown to the player and the frame failed.
A #canvas carrying data-transparent gets no background: the empty window
and each Kryon frame clear to alpha 0 with clearRect, so the editor
preview shows its theme wherever a program draws nothing. Widgets draw
over it as usual. Pages without the attribute stay opaque.
The program-entry test checks window.zi's page and examples/hello.zi
both ways.
audio_decode_mp3 adds MP3 and MPEG Layer I and II audio to audio_mixer by
import, streamed at the stream's own rate through audio/mp3, which audio
5ea3f6f1 adds over a pinned dr_mp3; Kryon now pins that audio commit. make
builds the audio package's libziran_mp3.a for the programs that link it.
A stream's last frame now plays before it finishes.
tests/desktop_audio_mp3_test.zi checks the mixer's frames against
audio/mp3's own decode of the package's fixtures, a 44.1 kHz stream's
length at 48 kHz, and an MP3 asset through Kryon's asset audio.
audio_mixer mixes sounds decoded whole, music decoded while it plays and
PCM streams into 48 kHz float32 stereo, with gain, pitch, loops, pause and
a tap on every mixed block. audio_sink_sdl plays it from SDL2's audio
thread; audio_decode_opus (streamed through audio/opus) and audio_decode_wav
add formats by import; media_audio_desktop runs kryon/media_audio on it.
tests/desktop_audio_test.zi renders into its own buffer and plays through
SDL's disk driver, with no audio device.
The Linux desktop host routes each SDL event to the window it names and
reports the sideways wheel. New optional modules, each linked only by the
programs that import it: desktop_keyboard (held, pressed, repeated and
released keys), desktop_window_state (minimize, maximize, restore, raise,
always on top, monitor bounds and display scale), desktop_secondary_window
(more windows with their own Cairo surface, presenter and events, with the
raylib_secondary_window calls), and cairo_assets (embedded pictures decoded
from memory), cairo_typefaces (typeface_source on Pango and fontconfig) and
cairo_render_scale. tests/desktop_windows_test.zi drives them on a private
Xvfb with XTest input.
A drag's release also counts as an activation, and TextFieldCore placed the
anchor on every activation, so a selection made by dragging collapsed to a
caret when the pointer came up. The press places the anchor; a release keeps
it, so a click (released where it pressed) still places a caret, and an
activation without a release still places it too. Numeric fields keep
selecting their whole number on the focusing tap.
tests/ziran_text_field_widget_test.zi checks a held and released drag, a
click in one frame and over two, the same in a secure field, and Shift+Right
after them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
pkg path validates a local development identity itself; only locked builds
must match the provider edge's exact commit.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The Canvas host registered nothing on first use: every frame pumped Lanczos
copies, the window reset meshes and copies, an evicted asset forgot its
copies, and the host polled the test driver directly, so even a box carried
the Lanczos cache, the resampler, page meshes and the test driver. Now the
first smooth copy registers the pump, close and forget (canvas_window), the
first warped picture registers its mesh batches, smooth copies are reachable
only once a page asks a picture's size (as on the desktop), and test input
comes through the frame driver. canvas_raster and page_mesh drop their unused
image imports.
Paint queues warped pictures through their own emitter, so no host links its
mesh rasterizer for a program that warps none.
Web profile (C files, C bytes, page bytes), before -> after:
box 74, 990 402, 1 388 955 -> 70, 828 685, 1 346 817
button 85, 1 238 728, 1 598 206 -> 79, 969 324, 1 487 512
hello checked modules 84 -> 80; an empty window stays at 10.
make pay-per-import-test checks the web window, hello, box, button and
image next to the desktop cases.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Image previews import avif/encode and avif/preview, which the pinned avif
f84c1625 did not export, so builds from the pinned packages failed. avif
f26a5522 publishes them.
The desktop rasterizer loads, decodes and smooth-copies file pictures once
a program first asks a picture's size, which every widget that draws one
does first, so vector icons and managed pixels draw without decoders,
threads or asset paths. LanczosSnap is geometry's RectangleSnap, so a
texture draw no longer reaches the Lanczos cache.
A button reaches file pictures and atlas icons through the new
image_lookup. kryon/image is now image_files, which re-exports the Image
widget (image) and fills the pictures; kryon/icon fills the atlas. Library
code imports image itself, so importing a picture-capable widget registers
nothing. Navigation, copy and confirm buttons and the widget host fill the
lookup where they draw, as they reached pictures before. Props modules that
only name Image.Props import image_props, now also exported; unused image
imports are gone.
The frame and the accessibility host reach text requests and editor focus
through text_editing, which text_request and text_input_platform fill, and
the frame samples scrolls through scroll_sampling, which scroll_device
fills.
Desktop examples (C files, C bytes, executable), before -> after:
button 96, 1 411 582, 448 264 -> 70, 980 794, 342 016
text 95, 1 445 077, 462 504 -> 71, 1 020 207, 356 472
textfield 107, 1 580 157, 514 496 -> 84, 1 166 840, 409 840
make pay-per-import-test checks button and textfield; tests whose programs
no longer reach pictures lose their picture bindings and stubs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
kryon/app imports each platform's window (desktop_window, the new
page_window) and frame loop (frames_desktop, frames_web) as separate
modules. A program that only calls App.Show now checks seven modules on
Linux instead of ten: no session, geometry, desktop runtime or frame host.
desktop_window takes the SDL event from the new sdl_event module rather
than the whole desktop runtime, and the frame loops import app_types by
name so an unrun loop leaves no stub in the checked program.
make pay-per-import-test checks window.zi's exact checked program.
The desktop frame loop applies the frame driver's test pointer, wheel and
input hooks, and raylib checks synthetic pointer frames against the app's
live session.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The renderer artifact build looks up Kryon's locked dependencies through the
root's edge when a local override changes its package ID. Selecting the test
driver no longer changes dependency artifact identities.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A node hidden with SetVisible still casts its shadow when SetShadows enables
it; shadow maps no longer skip nodes the camera doesn't show.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Record per-example C files, C and header bytes and executable sizes for
all 101 examples, the before/after table, and the modules frame examples
carry without importing them (pictures, text input, gamepad navigation).
The plan keeps only the open steps.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ziran 93a54f08 kept only the first eight characters of a host import's
record type when lowering to ZX, so --project bundles of hosted widgets
(TileMapResult, ActionModalResult, BundleInput, ...) failed with "this
type has no portable lowered representation yet". Ziran 94355db4 keeps
whole names; the toolchain pin moves to e813c847, current master.
CI built examples/box, examples/image and examples/gallery from the
Kryon their locks pinned, not from the checkout under test: box and
image pinned an image-codec that their locked Kryon no longer declared,
and the gallery's Kryon lacked kryon/box. CI now gives these examples
the same overrides ziran.local.toml gives them locally, as the Pages
workflow already does, and their locks name current Kryon and the same
Ziran.
The notification host test reads std/file.zi from the Ziran its package
graph resolves rather than ZIRAN_ROOT, which CI checks out separately.
The secondary raylib window test links XTest, so the desktop hosts job
installs libxtst-dev. The renderer artifact test builds its consumer
apps with Kryon's Ziran pin: Ziran v0.4.2 cannot read Kryon's current
ziran.toml.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
App.Show(window) on the desktop no longer runs the frame loop: a new
desktop_window module opens the SDL window, waits for its events, clears
and presents it, and closes it. examples/window.zi now reaches only the
program, kryon/app, the desktop app host, that loop, the SDL presenter and
C strings; its executable is 17 KB instead of 118 KB (265 KB before this
work), with none of the desktop runtime, raster, sessions, input or
accessibility. The window still opens centered, titled, resizable, in the
empty frame's colour, redraws when exposed or resized and exits 0 when
closed or terminated.
make pay-per-import-test now checks that the window carries none of the
frame loop, desktop runtime, raster, accessibility, session or input
modules either.
Nothing is imported by default. App.Show(window) shows a window without
frames; examples/window.zi uses it and now compiles to 23 C files and
133 KB instead of 62 and 546 KB, with a 118 KB executable instead of 265 KB.
Hosts that run frames (App.Run(window, Draw) and the frame host
desktop_run) call TreeFrameUse() to register the widget tree's frame driver
(tree_frame, through frame_driver): input routing, begin and end of the
frame, cursor shapes, scrolling, gamepad navigation and the test driver's
hooks. The call, not an import, brings it: a module initializer in the tree
would have turned existing import cycles into fatal startup cycles and made
hostless test builds keep every program export.
Accessibility is split. The window keeps the AT-SPI connection and the
application object; widget roles, states and nodes live in
accessibility_tree_linux, which the same hosts register with
AccessibilityTreeUse().
The test driver is in a build only when KRYON_TEST_DRIVER is defined;
desktop_runtime then connects it through test_driver_frame (exported for
other native hosts), and a window started for a test without it stops and
says how to build it. App.Run passes the window's title straight to the
window. input_delivery, frame_input_provider and gamepad_navigation move to
src/ui, InputDeliveryTake to input_take. desktop_loop and test_driver_frame
are exported. The ZX player imports cursor_picture again, so its guests'
picture cursors decode.
make pay-per-import-test builds the window, hello, box and image examples
and checks which modules their generated C carries.
Kryon's picture cursors register a decoder that calls the host from a
module initializer (cursor_picture). Ziran 93a54f08 includes 38f133cd,
whose Go check accepts storing such a procedure; the toolchain pin moves
there from 37a64372 so the Go backend check builds Kryon again.
PrepareGrade converted its colours through the CPU renderer's linear
table, which only a CPU render filled. A host drawing only on the GPU
got a black tint and black rooms. The grade now fills the table itself,
and the daylight test prepares a grade before anything is rendered.
The desktop loop called the image decoders (through cursor pictures), the
Lanczos cache and its worker threads, video and the Kryon font every frame,
so every desktop program carried them. Now each part registers itself the
first time it is used: the rasterizer's picture cache and smooth copies when
a frame draws a picture, the font and shaped layouts with the first text,
and video as a named picture source (raster_picture) when it opens. Picture
cursors decode through kryon/cursor again (cursor_picture and the
CursorPictureHost capability, with no-op exports in the hosts without
picture cursors). A widget host no longer imports the decoder; the
application that embeds it imports kryon/cursor.
examples/window.zi now generates 39 C files and 344 KB instead of 62 and
546 KB, and its executable is 179 KB instead of 265 KB. Native desktop
project builds also link X11 explicitly (from the ATR integration lane).
A night room took a dark tint that hid the picture; it now keeps more of
its colour under a lighter moonlit blue. The low morning and evening sun
through a large window lit most of the floor too brightly; its beam is
softer, and moonlight a little stronger.
Scenes made of painted pictures ignore scene lights, so a time of day had
no way to reach them. Scene.grade tints and desaturates every material not
marked ungraded, and lights it with up to four lamps and a beam through an
elliptical opening such as a round window. The CPU and GPU renderers share
its preparation (PrepareGrade) and agree within the GPU test's tolerance.
kryon/daylight gives the sun's path for any local hour, the grade for that
hour (exactly neutral while the sun is high), warm sun or cool moonlight
through a window, lamps from dusk to dawn, and a storybook sky drawn by one
material shader: a horizon-to-zenith gradient, the sun's glow and disc, two
drifting cloud layers and twinkling stars from tileable noise made in code.
TextPixels shapes a string exactly as the window draws it and returns a
straight-RGBA picture: Pango on Cairo for desktop builds, the page canvas
on the web. Hosts use it to paint text into textures, such as a sign that
turns with its door.
The test driver gains a capture command: `capture path=` asks the host for
its next finished frame as a PNG, and DriverCapture sends it from a test.
The desktop host writes the raster it shows (RasterWritePNG); a host that
cannot capture answers "this host does not capture frames" instead of
leaving the test waiting. Hosts capture through TestDriverCapturePath and
TestDriverCaptured. The driver client test covers both answers.
On the web (OS == .WEB) image_pixels decodes with the browser's codecs
through PageImageDecode, so a canvas build no longer links raylib's image
transforms, and scene_gpu links no EGL or GL: its probe reports the GPU
unavailable and SceneGpuRenderOrCPU draws with RenderScene. Jungle's
website builds and draws its 3D rooms this way.
A secure TextField with a nonempty value and an empty display_value painted
nothing and showed its placeholder, so an API key field looked empty until
the app's show toggle. TextFieldSecureDisplay now returns the caller's
explicit mask, or one '*' per scalar of the value, which keeps the existing
codepoint cursor and selection mapping. The secret still never reaches
paint, semantics or the clipboard; a focused regression covers the default
mask, an explicit mask and an empty value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ziran's drivers moved to cmd/zi2* and cmd/zx2*, so the Ziran source lists
that decide when the player runtimes and compiler rebuild now include
those folders too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- GPU scene renderer: moved, turned or scaled nodes re-send only their own
triangles instead of rebuilding the scene; per-node matrices are reused;
FreezeGeometry skips geometry comparisons; lights carry projected
textures (LightCookie) in the CPU and GLES renderers.
- One ordered per-session key and text delivery path across Desktop,
Canvas and Raylib.
- Context-menu rows show accelerator labels and checked state.
- Bundle apps keep extracted assets that already match instead of
rewriting and syncing all of them on every open.
- Image and PDF export modules, hosted box tests, brand assets, plans,
and the ZX changelog entry.
Ziran dropped the semantic bundle VM: every bundle is revision-28 executable
ZX on the instruction engine (or its Wasm tier). Players and hosted apps
call InstantiateBundle on every target, including the browser; the --vm
option of the zx player goes, and its tests run without it. The web,
Raylib and Android runtimes build libziran in normal mode so they carry the
engine (BOOTSTRAP=1 builds have none), and their rebuild rules watch the
engine's Ziran sources.
SystemPrimaryText, SystemPrimaryAvailable and SystemPrimarySet read and set
the X11/Wayland PRIMARY selection through the host. The SDL desktop and
Linux Raylib hosts implement it with SDL's primary selection; the Android,
Canvas, pixmap, terminal and bundle hosts report it unavailable instead of
aliasing the ordinary clipboard. Terminal uses it for selections,
middle-click, Shift+Insert and Paste Selection.
RaylibInputPoll took modifiers only from keys still down or just released,
so a Control press released again within the same poll was lost and a
scripted Control+C reached the app as a plain C. Modifier presses from the
pressed-key queue now apply to the keys after them. raylib_window_test
covers the tap.
The style query cache returned before the settings watcher ran, so after
the default display changed it answered from the old settings and the
style generation did not advance. Check the default settings first.
Native Linux apps can drag data out to other applications with the optional
kryon/DragSourceLinux module, an XDND version 5 drag source on its own X
connection. It starts while the toolkit keeps its implicit button grab, so
the toolkit still sees the release; it follows the pointer, finds the
top-level XDND window under it (honouring XdndProxy and skipping its own
shaped drag icon), sends Enter, Position, Leave and Drop, answers
XdndStatus, serves the XdndSelection data including TARGETS, and reports
when the pointer is over one of the process's own windows so the app can
handle internal drops. The suggested action follows GTK's modifiers.
tests/drag_source_linux_test.py drops onto an independent python-xlib XDND
target on a private Xvfb from source and saved IR (make
drag-source-linux-test, already part of make test).
GtkStyleIndicatorRaster and GtkPainter kinds 9 to 11 draw the theme's own
check box, radio option and submenu arrow with gtk_render_check,
gtk_render_option and gtk_render_arrow, so native menus show check, radio
and submenu rows as GTK draws them.
No project used the dom profile, and it added a second browser host to
maintain beside Canvas. This removes dom_host, dom_tree, dom_paint, dom_run
and dom_app_run, the dom profile in the project tool, docs/dom.md, and the
DOM tests and their three make targets.
The shared browser code loses its DOM branches: page_events no longer tells
a DOM host about presses, blur and document layout, page_core and
page_texture drop the native DOM flag and the img decode kept for it, and
CanvasAppMainLoop takes no argument. The web template builds a Canvas2D
page. The cursor and rotated text tests cover the Canvas profile only.
Reaching the cursor picture decoder through a CursorPictureHost capability
broke the Go backend check, which refuses a host call reachable from global
startup, and four tests whose hosts link the hosted-widget host without
providing it. The desktop host decodes cursor pictures directly again, and
cursor_picture, cursor_api and the host stubs are gone. The image decoders
therefore stay in every desktop program; an empty window is 62 C files and
545 KB. The test driver and text reductions are unchanged.
Ziran's WebAssembly tier runs only s64 -> s64 host capabilities and no longer
hands other bundles to the VM, so the ZX Canvas player and hosted apps failed
to start in a page. bundle_player and hosted_app select the portable VM on the
web with InstantiateBundlePortable. zx-services-test, zx-hosted-test and
zx-canvas-test pass again.
Sixteen targets in make test, and video-test outside it, only reran one
tests/ziran_*_test.sh that the behavior test runner already runs. They are
removed, leaving 70 targets; make test-focus TEST=NAME runs one script, and
push-check runs the pixmap GPU script that way. The runner clears XAUTHORITY,
the session bus, the session manager and GDK_DISPLAY as those targets did.
The test driver is test code, yet every program carried it because the hosts
call it each frame. kryon/test_driver now passes the platform's input through
unchanged, and the driver itself, test_driver_engine, is compiled in only when
a build defines KRYON_TEST_DRIVER: --define KRYON_TEST_DRIVER on a direct
build, or the variable set in the environment of kryon build, which keeps a
stamp per setting so toggling it rebuilds. A program built without the driver
and started with the variable set stops at once and says how to build it.
The desktop host decoded cursor pictures directly, which kept PNG, WebP and
AVIF decoding in every desktop program. The decoder is now reached through a
procedure that cursor_picture registers from its initializer, using the new
CursorPictureHost host capability. kryon/cursor, which applications import,
and the hosted-widget host import cursor_picture; the cursor module the hosts
import does not, so hostless and custom-host builds need nothing new. Kryon's
hosts export the capability.
An empty window generates 43 C files and 370 KB instead of 62 and 627 KB, and
its executable is 196 KB instead of 296 KB. The program entry test asserts
that the decoders and the driver stay out, and that a build made for a test
gets the driver.
The Canvas host is selected by OS == .WEB, so a page build that only defines
PLATFORM_WEB fails on unresolved Canvas names. The Canvas backend, audio and
text tests, the shared browser behavior helper, and the Lanczos, asset cache,
bitmap image and document storage tests now pass --target-os web
--target-cpu wasm32 (with --target=c when saving IR).
The host keys test builds as part of the project: the key modules import
widgets by name, which bare module paths no longer resolve. The toast test
drops its binding of the platform keyboard capability, which a toast program
never calls, so binding it was refused.
canvas-test, document-storage-test, lanczos-goldens-test,
canvas-asset-cache-test, bitmap-image-test, host-keys-test and
toast-action-test pass again.
text_request checked the cut points of a platform's text request with
std/grapheme, and accessibility can send such a request, so every desktop
program carried 134 KB of grapheme tables. The check now goes through a
procedure that text_boundary registers from its initializer. The text field
and text area import text_boundary, so only programs that can edit text
include the tables. Without an editing widget nothing could take a request,
and TextRequestSend refuses it.
An empty window generates 121 KB less C and its executable shrinks from
346 KB to 296 KB. The program entry test asserts the tables stay out. The
Android text editor test, which sends requests without a widget, imports
text_boundary.
The Canvas frame snapshot test binds the app's Frame to the ProjectFrame
capability its host calls, which the link was missing.
The desktop hosts of the time picker and image examples import a shared demo
module beside them. Project builds only take modules from the package's roots
or a named module path, and examples/ cannot be one because window.zi shares
a name with a project module. The two demos move to examples/demo/, which
those rules name. The time picker demo also uses the current Text.Props size
field and imports time_picker_behavior for TimePickerText.
The pixmap parity test builds the image example as part of the project, since
it imports kryon/image, and passes every saved module when building from
saved IR. Naming only the entry left out the app module bound to the host's
ProjectFrame capability, so all four template cases failed.
A project whose entry module declares main, such as examples/window.zi, is a
program. The project tool now generates a host that only calls that main, so
kryon build gives a desktop executable or a Canvas page from the same file. A
portable zx profile needs a Frame entry and is refused with that reason.
Browser builds pass --target=c --target-os web --target-cpu wasm32 when they
save IR. The Canvas host is selected by OS == .WEB, and untargeted IR is
portable, so with only PLATFORM_WEB defined every canvas, DOM and raylib-web
project and the ZX canvas player failed on unresolved Canvas functions. The
frame-input and password Canvas tests name the target the same way.
Kryon's manifest names the desktop host's system libraries in [package]
links, so ziran build --project --target=c --exe links a program in this
checkout without caller LDLIBS. The examples Makefile drops its pkg-config
link flags and its own compile of the desktop examples.
`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.
The kryon:renderer-raylib Android artifact configures
cmake/renderer-artifact, which still called kryon_android_raylib after the
renderer-free native host helpers in cmake/KryonAndroid.cmake stopped
defining it. Every arm64 and armv7 artifact build, such as Shovey's
android-fdroid, failed with an unknown CMake command.
The artifact project now owns that function in RaylibAndroid.cmake: raylib's
GLES2 Android backend, Kryon's WebP and AVIF codecs, and the audio package's
libopus. Raylib's own APK reader keeps the KryonRaylibFopen name, so it never
collides with the __wrap_fopen in src/backend/android_fopen.zi.
KryonAndroid.cmake stays renderer-free.
make android-renderer-artifact-test configures the project for arm64,
checks the codec targets, builds raylib, and checks its fopen symbols.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Portable ActionModal guests send their actions as []Modal.ActionModalAction,
the type the modal's host declaration and the generated codec use. The widget
host still required the old unqualified []ActionModalAction, so a package
consumer's real ActionModal call was refused. Check the qualified name only,
and cover it with a package consumer bundle run through the real
WidgetHostCall.
Committed at the owner's request while the work continues.
- Detect unchanged GTK painter surfaces by exact byte comparison, clear
and copy them in bulk, and reuse resolved GTK style metrics and CSS
layers within a style generation.
- Present desktop frames before publishing accessibility changes.
- Context menu widget, keyboard and canvas input updates with tests.
Cloudflare Pages redirects widgets.html to /widgets, and the site only
recognised routes ending in .html, so every page on kryonlabs.com fell
back to the Overview. Match a route with or without the suffix, and make
the browser test server answer clean paths the same way the live host does.
- Keep scroll pointer, drag and momentum state per Session, so a preview's
frame sampling cannot release the page's scrollbar thumb or content drag.
- Left-align component navigation, drop the Kryon prefix from core component
labels, and syntax-highlight the usage, source and guide code areas.
- Replace the Apps text list with card images, public applications and GitHub
links, and rename Shelf to Explorer.
Restructure maintained components into per-widget source folders, add the
portable scene GPU renderer with GLSL shaders, hosted widget aggregates,
GTK theming and multi-target clipboard support, rebuild the guide with
theming guidance, and move the toolchain to the Ziran revision without
module root limits so the eighty component roots resolve everywhere.
A raylib host imports the static AVIF decoder only with AVIF_RAYLIB.
Other hosts decode no AVIF and link no codec library, so applications
that do not use AVIF keep a codec-free build.
Keep the GPUI and profiling harness, but restore the established SDL3 color workspace and normalization after the paired hardware comparison did not improve consistently.
The KSS package is now kryonlabs/css, a CSS subset. The catalog themes are
converted to CSS, the unused KSS fixtures are gone, and the docs, website,
DOM interaction test and site test name the CSS package.
Also carries the EMCC lookup in mk/emcc.mk from a concurrent task.
Ziran 9524616d stops the bounds-check prover from treating overflowing
guard sums as exact, so it keeps the bounds checks 6dfa969c dropped, and
brings the owned-Text leak fixes and the SIMD and ZX lowering speedups.
make push-check passes against the lock.
On a busy CI runner the canvas Lanczos test's fresh Firefox profile was
still starting after the 30 s limit. Startup now waits up to 120 s, and a
failure includes the end of firefox.log instead of only its path.
A WebGL page needs SwiftShader switches the fixed argument list did not
have. Browser.flags adds up to 12 switches before the first page; the
DevTools test checks that one reaches Chromium.
The raylib web test took one headless screenshot at a fixed 6 s, and a
slow CI runner could catch the WebGL canvas black before a frame was
presented. The screenshot now retries from a fresh profile with longer
waits (6, 20, 45 s) until the cube, clear color, Kryon panel and asset
image are all on screen, then asserts each pixel.
A DOM image texture now keeps the img whose decode made it ready for its
whole life, and dom_paint moves that element into the paint node instead
of giving a fresh img the blob URL. Nothing depends on the browser's
image cache, so an eviction cannot bring back a blank frame. A second use
of the texture in the same pass draws from the texture's canvas.
The image decode test now hides the image, loads six other textures,
shows it again twice and checks it is the same decoded img, the copy
draws, and no img was ever published undecoded.
dom_project_test gives every browser driver a short TMPDIR from a shared
toolchain helper, so Chromium's sockets fit whatever TMPDIR the caller has.
A DOM page texture reported its size as soon as createImageBitmap
decoded it, while the page img given its blob URL had not loaded yet,
so the first frame showed nothing. PageTextureFromEncoded now also
awaits HTMLImageElement.decode() on the source URL for native DOM
pages and frees the texture when that decode fails.
dom-project-test gains KRYON_DOM_IMAGE_DECODE: a headless Chromium
driver checks that the frame which paints the image reports 300x200
with its img complete, and that undecodable or rejected images report 0.
A raylib profile with platform = "web" links raylib's PLATFORM_WEB library
(GLES2 on WebGL 1, with rmodels) and the PLATFORM_WEB host through Emscripten
with ASYNCIFY, so default and custom hosts keep their while PollRaylib() loop.
assets and the new preload key mount project directories in the page's file
system, and the page lands as index.html/js/wasm/data in build/NAME-PROFILE/.
WebP decodes with the authored engine there; AVIF stays native-only.
make raylib-web-project-test checks a 3D cube under Kryon UI in private
headless Chromium.
TextTypefaceSelector is #reads, so RaylibTextTypeface no longer hands the
caller's name to LoadTypefaceData: the hashed key and the file extension
come from its own key and path buffers. Ziran 6dfa969c follows #reads
strings through record field paths, so the emphasis and italic rasters
check as they are. text-hook-hosts-ir-test, now in push-check, checks the
raylib, threaded raylib, Android and canvas hosts that install these hooks.
raylib-text-pixels-test still compiled with bare module paths, so the
webp package import failed, and it linked the package's unbuilt
libraylib.a without the image and audio libraries. It now builds with
--project like the other host tests. Both text tests take Kryon's built
raylib, webp and avif archives from make.
The native MediaAudio provider links -lopus since Ogg Opus playback, and
the audio package expects the system libopus development library. The
hosts, web and zx shards and the Xvfb desktop job failed to link without it.
Text calls the installed selection painter through TextSelectionPainter,
which is now #reads, so Ziran frees a fresh props.text after the call.
TextSelectionDraw copies selected text through SystemClipboardWriteHost,
which every host copies during the call, so that foreign is #reads too.
TextEmphasisRaster, TextItalicRaster, CaretMeasure and TextTypefaceSelector
are #reads as well; the text page test host now keeps its own face name.
A new leak test counts 0 allocations left after 1000 frames of a fresh
Text through a plain line, an ellipsis line and the selection painter
(1000 before).
The native provider now decodes Ogg Opus through the audio package on
Windows too (audio f5eed1e). MinGW hosts link -lopus -lssp -lm, since the
package's libopus keeps its stack protector. The renderer-raylib artifact
builds the package's static libopus for Linux, Windows and Android, so
artifact consumers that use media_audio_raylib link without a system copy.
The Windows artifact sets CMAKE_SYSTEM_PROCESSOR, which dav1d's cross build
now requires, and the artifact test pins Kryon's locked toolchain. The Opus
test gains --windows: a MinGW cross build run under a private Wine prefix.
The Raylib provider now chooses its decoder by content: an Ogg page whose
first packet is OpusHead decodes through the audio package on Linux and
Android, streamed in two 2048-frame blocks refilled by Status and the owner
tick. Other bytes, including Vorbis Ogg, stay on Raylib; macOS and Windows
return Unsupported for Ogg Opus and the browser keeps decoding it itself.
Play starts the stream before filling it, since PlayAudioStream discards
queued blocks. Linux links -lopus -lm, and the Android build compiles the
package's static opus target. The Opus tests now run the production
provider, including on an Android device with null audio.
The bundle, local-app and web hosts only read these strings during the call,
so Ziran frees a fresh Text passed to them. A new leak test counts 0
allocations left after 1000 rounds of each.
Every host only reads the measured strings during the call, so Ziran frees a
fresh Text passed through TextProps to TextWidth and TextLinkAt. The paint
leak test counts 0 allocations left for both.
Label, emphasis, slanted and image-path paint calls now hand their strings
only to a read-only copy into the session's per-frame text blocks, and the
queued command keeps just the copied range. Ziran can therefore free a fresh
Text argument right after the call. The pools keep room for their next block,
so copying never moves text that is being copied from. Paint outside a
frame draws from a short-lived copy. A new test frees every label before
the frame draws: under an allocation counter and AddressSanitizer, nothing is
left after 1000 frames and the frame text keeps its capacity.
avif now pins libaom 3.15.3, whose CMake detects NASM 3, so CI drops the
yasm workaround. image-codec moves to 36055315 with avif, av1 and webp
02145a00, so the locked graph has one image-codec revision for the values
Kryon hands to both codecs.
The Canvas host cached 32 images and replaced them in arrival order, so a
scene drawing more, such as Jungle's world map with its landmarks and the
neighbouring scenes it preloads, decoded each image again every frame:
50 ms frames instead of 17. The cache now holds 128 images and replaces
the one used longest ago, within a total of decoded pixels, and reuses
forgotten slots first. tests/canvas_asset_cache_test.py checks it in
private headless Firefox.
A canvas or DOM web profile now links the program twice, once with
-msimd128, and mk/web-page.sh assembles one page carrying both builds
and the font once. A loader asks WebAssembly.validate about a probe
module holding one SIMD128 instruction and starts the SIMD128 build,
whose std/resample Lanczos kernels are SIMD128, or the baseline build
where SIMD is unavailable.
tests/web_simd_page_test.py (in canvas-project-test) builds a Canvas
project and checks in headless Firefox and Chromium that the SIMD128
build runs with simd128 kernels, that a page whose validate rejects
SIMD falls back to the baseline build, and that every Lanczos resize
gives the same bytes in both builds and with scalar kernels.
Only an upright smooth image that has no Lanczos copy yet draws with
imageSmoothingQuality high, and it restores the default afterwards, so
warped meshes and rotated or mirrored images filter as they did before.
The toolchain moves to Ziran 5e49140f, whose std/thread_linux links on
macOS without pthread_tryjoin_np; native C builds there define
POSIX_THREADS, so the Lanczos worker imports it.
The live editor embeds the demo's locked Kryon UI sources, and 20b38574 has no Card, so the gallery's card scene failed its language check. The demo now locks 4a1423d0 and that commit's image packages.
One shared cache in src/backend/lanczos_cache.zi resamples a smooth
picture to its device-pixel size with Ziran's std/resample (Pillow's
fixed-point Lanczos with SSE2, AVX2 and NEON rows) off the UI thread,
or a slice per frame in the browser. It keys copies by content,
revision, source rectangle, size and session, keeps the old copy
stretched until the new one is ready, caches only axis-aligned draws,
and bounds copies to 4096 per side, 4.19 Mpx, 64 MiB in total and
32 MiB per session.
Cairo, Raylib, pixmap/SDL3 GPU and Canvas draw the copies 1:1;
tests/lanczos_backend_goldens.sh checks each against Pillow, and
make lanczos-benchmark compares std/resample with Pillow, Pillow-SIMD,
libvips and stb_image_resize2 here and on an ARMv7 phone over ADB.
The toolchain and the renderer artifact test pin Ziran a0ff750c, the
first commit with ARMv7 NEON resample rows.
The image codec integration left four CI gaps:
- The bitmap browser test hard-coded a Bun path; it now uses the
configured JS_RUNTIME like the other browser tests, and starts from a
clean work directory so stale IR cannot leak into its saved build.
- The gallery locked Kryon 20b38574, which has no Card widget for its
card scene; it now locks f2bfeb40 and that commit's image packages.
- The raylib typeface, frame pixel and frame snapshot hosts resolve the
webp, avif and image_codec packages through the project and link the
WebP and AVIF archives they now use.
- The behavior suite builds the WebP archive the image job test links.
dav1d is the default engine in every native artifact and CMake consumer, with
libaom kept as the explicit oracle. Large frames use up to four threads.
Strict parity, cross-target, Android, browser-capability and benchmark
suites cover each target.
Bitmap images and their store update in place on desktop, pixmap and web
renderers. Native Opus asset transport and a raylib audio sink join the
media audio host. Export the image and SVG shape modules for apps, and
read the shot profile's picture from standard output only so build
diagnostics on standard error never mix into it.
A page that pads #canvas-frame for safe-area insets made the canvas smaller
than the frame Kryon measured, so the picture was squeezed upward and a tap
pressed the button above. The page now draws at the canvas's own CSS size and
maps pointer positions through the canvas's shown box.
Shelf is no longer marked legacy. The apps page and home card say it is
available to build from source, the page descriptions name it, and the
showcase data lists it again.
Add Card elevation and consistent widget states, retained TextArea selection,
and rounded image rendering. Integrate published image-codec, WebP and AVIF
packages across native hosts and renderer artifacts with project-aware builds.
Modernize Kryon Labs around visual GUI apps and modules, with real previews,
honest availability, and rebuilt interactive editor and widget gallery assets.
Bound private browser test lifecycles and verify source, saved IR, native,
portable, browser, Windows and Android paths with the published compiler.
CursorSetPointing sets the cursor shown where a click does something:
clickable widgets and painted targets an app hit-tests itself and marks
with CursorHover while it builds the frame. The mark commits with the
tree, so retained or cancelled frames keep it and the cursor changes only
when the hovered target does. PressProps.cursor lets a press the app
refines with its own hit test name the arrow off its painted shape, on
desktop, Canvas and DOM, without changing presses, touch or keys.
Cursor CSS was built from WebText views of Wasm memory, which have no
JavaScript handle, so web pages kept the default arrow. PageTextHandle
makes a real string handle for the cursor override, the image-set text
and the hidden cursor.
The cursor test now also builds the probe for Canvas and DOM and checks
every request in a private headless Chromium: the 2x image set with its
hotspot, the application cursor, hidden, refused sizes, and no style
rewrite while a request repeats.
CursorStored used std/byte_text_linux, which the C archive does not
build, so linking programs against libkryon.a failed. Use the builtin
TextView instead.
Cursor requests now persist until the next deliberate change instead of
lasting one frame, and CursorSetDefault gives every session an
application cursor that replaces the default, clickable and disabled
shapes. Desktop caches decoded cursors, sets the system cursor only when
the resolved cursor changes, keeps it across focus and leave, and gives
X11 premultiplied pixels so soft edges show no light fringe. Canvas and
DOM build one density-aware CSS cursor and apply it only on change.
A process with no running activity crashed when Continue as approved
while the other app was closed: raylib's fopen wrapper read a null
activity. Absolute paths now use the real fopen and relative asset
paths keep raylib's reader.
The image job and graphics behavior tests link no codec archive, so they
export inert libwebp entry points beside their raylib ones. The WebP
fixture decode script leaves the generic behavior runner, which builds
no archives; make raylib-webp-decode-test still runs it.
Lossy, lossless and transparent WebP files, and the first frame of
animated ones, load through the existing image paths: raylib and Android
link Kryon's kryonwebp archive built from the locked libwebp source, the
Cairo desktop host opens the system libwebpdemux, and web hosts use the
browser's decoder. Files are recognized by content, not extension.
Fixtures cover each kind on the raylib, Cairo and browser paths, the
renderer artifact ships libkryonwebp.a, and android-webp-link-test links
the decoder for every Android ABI.
Native consent dialog, caller and provider checks through the signing
certificate, and a provider giving the public name only to listed apps. No
Google library.
At a fractional density the pixmap host drew text with a rounded device
font, so 13 units at 125% advanced as 16 pixels rather than 16.25. Carets,
pointer hits and selection highlights use logical advances times the
density, so dragging to the end of a word stopped a letter or two short and
the highlight ran ahead of the glyphs. The pen now advances at the exact
scaled logical font while glyphs still rasterize at the whole device size.
Text areas and fields also round the pointer to the nearest logical unit
instead of truncating it, which at 125% could miss the caret stop past a
narrow glyph such as "i".
pixmap-text-scale-test checks drawn ink against caret edges and pointer
hits for single-line and wrapped rows at 100%, 125% and 150%.
A republish that moved a pressed button, even into the place it already
held, made the browser drop its click, and a page press released over a
button left the page's pointer held, ignoring the input that followed.
The host now skips moves that leave an element in place, activates a
button once on a release on that same button when the browser sends no
click, cancels that on a release elsewhere, focus loss or a replaced
button, and lets a page press's release reach the page.
DrawAndroidFrame called the application's Frame without publishing the
polled raylib input, so CaptureFrameInput was unavailable and games that
require it stopped immediately. Publish it as raylib_run does and close
it before every EndRaylibFrame, failure paths included.
android-frame-input-test drives the canonical Android frame on desktop
raylib under private Xvfb.
AppFileWrite fsynced every ancestor of the written file, opening system
directories above the private root. Android apps may traverse but not read
those, so every document and asset write failed after its rename.
Synchronize only from the file's directory down to the root. A newly created
root persists its entry when it is created: required for parents this call
created, attempted but not required for parents the host already owned.
Invalidating assets unloaded every texture under the folder at once, so an
on-screen image went blank until it decoded again; a practice pack install
blinked a picture each time. Invalidation now marks images for revalidation
on desktop, Android and the web: each keeps drawing its texture, bytes that
hash the same keep it without decoding, and changed bytes replace it in one
step only after they have decoded. An image whose bytes are gone is
forgotten. A new asset reader still forgets every image.
Android debug builds log frames where a drawn image loses its texture.
AppSupports("kryon.input.desktop") is true on native desktop hosts, so
games can skip touch-controls questions there; Android and the web answer
no, as do older hosts.
Play Billing moves from the app template's build.gradle into
templates/android-gplay.gradle, which only -Papp.edition=gplay applies from
the Kryon checkout; the scaffold no longer copies src/gplay into apps. The
normal and F-Droid editions' build files and APKs then name no Google
library, and F-Droid's scanner finds no usual suspect.
scripts/check-google-free.py (and the google-free action for app CI)
fails when a normal or F-Droid APK holds Google library code, manifest
entries or library markers, or when a Gradle file declares one outside the
gplay edition; --expect-google proves it still finds Play Billing in a
-gplay package.
scene describes shapes and lights; RenderScene draws them with lighting,
shadows and smoothing, natively and in the portable runner. Shovey's art
tools render their sprites with it instead of three.js. The toolchain pin
moves to the std/image compositing it uses.
DevtoolsWrite sent the byte after a message's storage as its terminator.
Built strings are not followed by a NUL, so later messages were joined to
the next one and Chromium stopped answering every command, which made a
running game page look hung. The NUL is now written separately.
The test server answers Range requests with 206 Partial Content and sends
.ogg, .wav, .mp3, .webp and .jpg with their own types, so media elements
finish loading instead of holding their connections. Chromium now always
receives its DevTools pipes on 3 and 4, even when pipe2 returns those
numbers, which close-on-exec used to drop.
A blocking send of a large file stalled the test whenever Chromium paused
reading it, so no other request or DevTools message was served. Accepted
connections are now non-blocking and keep their response until the socket
takes all of it. The driver client's wheel comment gives SDL's direction.
kryon/devtools starts Chromium with --remote-debugging-pipe and no
display or session, attaches to its page, and serves a build from a
static server in the same poll loop: routes with their own bodies and
headers, an injected head script, and every request target recorded.
Tests evaluate and wait for expressions, click, type, take screenshots,
set the viewport, intercept requests and read the page's exceptions.
kryon/private_display starts a test's own Xvfb through -displayfd, checks
the server's /proc identity, starts apps on it with the desktop session
scrubbed from their environment, finds the windows a process owns by
_NET_WM_PID, reads titles, resizes, captures pixels, saves and loads PNGs,
and stops only the process groups it started. Tests no longer need
xdotool, ImageMagick or PIL for these steps.
kryon/test_driver_client is the test process's side of KRYON_TEST_DRIVER:
it finds widgets by label, role or key, presses them with the app's
pointer, types, sends keys, moves the pointer and waits for the tree to
settle, and reports what the app showed when a wait fails.
A real mouse click on a DOM-app button was handed to the canvas
hit-test, which resolves presses from the app's internal layout
coordinates. The overlay stylesheet reflows rows away from those
coordinates, so the click landed on whichever widget's stale bounds
covered the point: clicking Sources selected a style chip. Buttons now
stop mouse propagation before the canvas path sees it, and the DOM
click event carries the press for keyboard and pointer activation
alike. Drags and held controls on non-button surfaces still route
through the pointer path.
Android 9 has no font lookup, so a missing glyph fell back to Roboto and
every Chinese, Japanese or Korean character outside an app's own fonts
drew as a question mark. Read the face that /system/etc/fonts.xml lists
for the character's language (zh-Hans, ja or ko), skipping serif
fallbacks, the way Android itself chooses it.
The default host's loop moves to desktop_loop as RunDesktop(width, height),
so a project host that only needs another window size calls it instead of
copying the loop and missing retained painting and accessibility.
DesktopStartBeside starts a program opened from its build folder where its
files are.
The native HTML/CSS DOM rendering hands compiled apps a real scrolling
document, but the page event bridge still claimed wheel events for the
hidden canvas, so the browser never scrolled, and mouse downs stole
focus from text inputs, killing double-click selection. For
document-layout pages the bridge now leaves the wheel to the browser and
keeps the canvas out of focus taking.
Commit failures also report which scope and widget kind were left open,
via FrameFailureAt and the pending-scope keys recorded in the tree, and
the zx test shell logs module exits with a stack.
Large single-file datasets (a 17 MB catalog.json today, growing with the
archive) exceed the old 16 MiB cap: HttpTransferStart then rejects the
transfer before any request is issued and the caller only sees a silent
failure. Browsers stream into the caller's buffer, so a bigger ceiling
costs nothing until a body actually needs it.
The prebuilt compiler looked for std/ only where it was built, so CI
tests failed to import vec and c_string. The current Ziran setup action
links std/ and include/ where the locked compiler looks.
A frame's damage was one rectangle around every change, so Pip bobbing
above Shovey's board while Shovey walked below it repainted the whole
board each frame: about 250 tile draws a frame instead of 40.
Damage now keeps up to four areas that do not touch, and the browser
canvas clears and replays them under one clip. Hosts that read only the
joined area are unchanged.
Package setup sometimes stalled on the runner mirror, once for 44
minutes. The Ziran setup action now installs each job's packages, with
their recommended packages as before, from the canonical archive with
time limits.
The browser canvas never bumped the glyph metrics revision, so every
label was measured again each frame. Font loads and releases now bump
it, and an opened canvas starts at a nonzero revision.
An image asks for its width, height and texture in turn: the lookup
checks the asset it found last before hashing the path.
Kryon passed Ziran's own build directory to its make as an absolute path,
which made Ziran rebuild every object once more after any plain make in
the same checkout. Kryon now passes it the way Ziran spells it. CI sets
up the locked Ziran with its setup action, which downloads the prebuilt
compiler and reuses cached package checkouts, and package installs have
time limits.
Every frame stores each paint command's text and asset path for the next
frame's damage check. The copy found the destination block for each byte
(two checked indexes and a 64-bit divide and remainder per byte): 7.4% of a
Moto's frame in Shovey's browser page, 1.9% copied one run per block
through the block's address. The browser canvas also compared every cached
image path byte by byte for each image drawn; entries now carry a hash and
compare bytes only on a match.
kryon/play_billing now loads org.kryonlabs.play.PlayBilling through the
activity's class loader, so any Kryon app (including ones with their
own activity) gets Play Billing by adding the gplay sources and the
billing library; editions without them answer empty.
-Papp.edition=direct, fdroid or gplay picks the edition: the Google Play
edition gets Play Billing and the GOOGLE_PLAY define, the F-Droid
edition the FDROID define. kryon/play_billing adds typed helpers
(PlayBillingProducts, PlayBillingBuy, PlayBillingDone, PlayBillingRead)
so apps need no JSON.
Built with app.googlePlay=true, the Android template adds Play Billing
9.1 (Android 6+) and org.kryonlabs.play.PlayBilling. kryon/play_billing
reaches it through the activity's playBilling bridge: load one-time
products with their local prices, open Play's purchase sheet and list
purchases until the app's server has credited them. Other editions and
older activities carry no Google libraries and answer empty.
Hosts composing their own lifecycle with kryon/Canvas, such as Arcade's
browser edition, could only end a frame with EndFrame and repainted the
whole page every frame. EndCanvasUiFrame clears and replays only the
damaged pixels, as Kryon's own canvas runners already do.
In CI the first command in the templates test's empty cache fetches and
builds the locked Ziran and reports it, which broke the exact comparison
of kryon profiles. kryon check desktop now runs first.
The templates test no longer runs each new project through kryon run and
ziran run to compare its first terminal frame; it checks that every
template is created with a resolved kryon manifest.
raylib_runtime.zi stores the session the test driver validates pointers
against, but did not import session, so programs that check every module
together, such as Breeze's native build, rejected Session as unknown.
The desktop host now feeds the test driver like the canvas and Android
hosts: a test process can read the committed widget tree, press widgets,
type and send keys through the KRYON_TEST_DRIVER directory. Without that
variable nothing changes.
An application's manifest names system libraries for ordinary ziran
builds, but a Kryon project tool owns the desktop link line and dropped
them, leaving data-backed applications (SQLite, spatial, math) no way to
link their native libraries. Pass LDLIBS through like plain ziran builds
do.
The http_transfer desktop worker drives libcurl from a detached thread,
but the host link line never named it, so any desktop application using
HTTP failed to link. Prefer a libcurl.pc when the machine has one and
fall back to the runtime library by exact filename, which needs no
development package.
Real applications easily hold more data than Emscripten's fixed 16 MiB
initial heap; without growth their allocations fail and, when an
application keeps a lying capacity over a null allocation, heap writes
corrupt the module. ALLOW_MEMORY_GROWTH keeps small applications at
their small footprint while letting data-heavy ones allocate.
Image now sets the SemanticImage kind alongside its semantic detail, so
the DOM host reconciles an asset-backed image into a real <img src>
element. Until now nothing set that kind, and a document-layout image
rendered as a plain div with alt text but no source.
GetRouteOrigin returns the browser location's scheme://host[:port] once,
so a DOM or Canvas application can turn its own relative paths into the
absolute http/https URLs the HTTP transfer layer requires. The route
test checks the file: origin the headless harness loads.
Emscripten numbers errno values as WASI does, so a missing file reports 44
there, not 2. The browser counted every first read of a game's record as
an error, and games such as Shovey stopped on their first frame.
InvalidateRaylibAssets and InvalidateCanvasAssets drop every image, so a
host that replaced one folder of content, or merely found assets that had
been missing, made everything on screen blink while it loaded again: Inner
Breeze's games flickered each time an app finished opening or a practice
pack opened. InvalidateRaylibAssetsUnder and InvalidateCanvasAssetsUnder
forget only the images whose path starts with a folder, on the render
thread like the full invalidation, and keep every other image.
A bundle on the ZX player always drew at 100%, so a phone-sized window
showed desktop-sized controls. KRYON_ZOOM now sets its starting density;
the viewport and pointer already follow the zoom.
Entity, Breeze and Shovey already draw SvgIcon from kryon/svg_icon_widget,
which only resolves through local overrides. Exporting the widget and its
props makes the icon surface importable from locked package builds too.
Inner Breeze's practice manuals and settings move into the Practices
package, and they change speeds and durations with sliders and show a hold
with a progress bar. Slider, DiscreteSlider and Progress are now hosted:
the host drags the slider with its own pointer and answers the value, and
paints the progress bar.
A portable bundle could draw boxes and icons but no line at an angle, so a
chart's trend lines and dots needed compiled screens. Kryon's shapes are now
hosted like Box: the bundle sends their props and the host fills them with
its renderer's RasterTriangles, which every Kryon renderer provides. The
widget host test stubs that rasterizer, as it draws nothing.
A portable form could not draw a fieldset around its sections or place a
toggle at a row's end, because both needed the host's style and font
metrics. Fieldset is now hosted like Box, and the new toggle_measure module
answers the size a toggle needs, from its host as ToggleSize. The host
encodes the answer with the Vector2 encoder, now part of the widget codec.
A portable bundle could not show a row of choices such as Habits' week and
calendar views, so Inner Breeze drew them in compiled screens. Segmented
controls are now hosted like tab bars: the bundle sends its props and up to
32 options and the host draws them with its own widget and style.
A single-glyph font view points inside its parent atlas. Inspect that glyph directly so replacement of the parent cannot reuse a cached interior pointer. Cover address reuse in the real font fixture.
Capture borrowed asset bytes during app composition, decode on a bounded background worker, and upload only on the render owner. Keep loading frames responsive and discard stale results across resource generations.
Avoid empty text measurement round trips and let active frame pacing interrupt a previous idle rate. Add real GLES frame and texture hash coverage for borrowed sources, worker ownership, context changes and retained frames.
Use stable font slot tickets when lazy loading a font can replace registered name storage. Check the browser font branch from source and saved IR in the pagination regression.
Measure screen-sized text pages from the drawing props, preserve UTF-8 boundaries, and apply typeface and line spacing consistently through hosted widgets and queued paint. Keep hosted font assets inside their app resource policy.
Panels name a tray after GLib's program name, which is the executable's
file name unless set, so a desktop build showed up as
breeze-linux-x86_64. The tray thread now sets the program name to the
tray's id before GTK starts.
Run input, application code, layout and paint recording on a persistent
app worker while the NativeActivity owner replays and presents the preceding
owned frame. Keep graphics resources and mutable font atlases on that owner,
copy frame storage and scalar measurements, and attach JNI independently on
each host thread. Drain pending paint before destroying its resources.
Route full, partial and retained paint through the recorder, preserving
image texture metadata. The canonical Android runners enable the pipeline
by default; custom hosts call the shared RunRaylibAppFrame API. Existing
desktop and web event loops retain their serial path.
Local tests cover owned frame storage, overlapping stages, all flush paths,
JNI attachment lifetime and offscreen GLES frame/texture hash equivalence.
Moto matched runs retain p95 17.4 ms, with fps 56.1-57.0 before and 56.5-57.5
after; the busiest thread falls from 76.6-81.9% to 54.5-57.6% of one core.
Total CPU rises; this checkpoint provides headroom rather than a large fps gain.
Since db5d286d a widget submitted again under the same key is drawn under
a derived key and reported, instead of rejecting the frame. The label
test still expected the rejection; it now checks that the first widget
keeps the key, the repeat is drawn, and the frame reports the key.
Each row of 16 by 16 units is converted, transformed and quantized into
its own band of coefficients in a #parallel region; the Huffman coding,
whose DC values chain from block to block, then runs in order. The
preview bytes match the serial encoder exactly (192 sizes, channel
counts and orientations). Lock Ziran 11405473, which checks callees'
writes in parallel regions, reaches bound providers exported under
another symbol in native code and converts Go conditional arms.
The compiled browser host never called BeginScrollFrame, so every Scroll
in a compiled page ignored the wheel, drags and flings: Shovey's level list
on the website, embedded or not, could not scroll. It now samples the
pointer, wheel and clock like the bundle and Android hosts.
Photo previews are scaled down and turned upright row by row in
#parallel regions: each output row takes its own window of the output
and each output pixel sums its own block of source pixels, so the
preview bytes match the serial version exactly (checked on 192 sizes,
channel counts and orientations). Lock Ziran 5f003e58, which accepts
slice windows in parallel regions and runs native builds on one thread
per processor.
Each cached asset holds its 1 KB path inline, so finding a texture
stepped through up to 128 entries about 1 KB apart. On the Moto this
lookup took 13% of all CPU while Shovey ran. The path hashes now sit in
their own array, which a lookup scans before comparing any path bytes.
The showcase lists Inner Breeze, Pass and Terminal; Taiji, Rill, Shelf
and Krait leave it, along with the ide page that pointed at Krait.
Plan 9 build leftovers go too.
Android leaves TMPDIR unset, which natively compiled ZX apps need for
their scratch files, and only Kryon's own runner enabled the test driver.
android_process holds both, and AndroidProcessPrepare runs them for any
Android host.
A floating pad has lighter arms, a lighter hub and outlined arrows, so the
pieces under it stay readable. Drawn after the board, it takes the presses
there, as the topmost widget does. The hosted ZX probe uses the floating pad.
Comparing a retained frame's image meshes indexed the kept block for every
point, which copies the whole block each time: a still page of figures took
most of a second per frame on a phone. Read the block through its address.
Android hosts and raylib are compiled with -O2 instead of -Oz, because rlgl's
per-vertex batching and app drawing run every frame.
The canonical Android host now samples the pointer for the scroll device
each frame, as BundleApp hosts do, so Scroll views follow touch drags.
Android before 10 has no font lookup; the interface face is found by its
standard path there instead of falling back to raylib's bitmap font.
Keep the shared geometry in one Ziran UI module. Retain app-owned label and text helpers in each generated layout file, preserving the existing widget surface and layout calculations.
Reuse imported storage and discover supplied operations before generating missing codecs from schema metadata. Preserve complete-provider output and exercise partial providers across source and saved native targets. Regenerate the library against the current widget property records.
Raylib, pixmap and the browser canvas already sample an image's nearest
pixel when ImageProps.smooth is off; the Cairo host always blended, so pixel
art came out blurred on the Linux desktop. Smooth images keep Cairo's good
filter.
Pressing an arm steps at once, holding repeats like an arrow key, sliding
onto another arm turns and the hub stops; a quick tap steps once. Laws prove
the arm and timing rules, and the hosted browser test holds, slides, rests
and taps it. A debuggable Android build runs the test driver when its
private files hold a kryon-test-driver folder, so phone tests can press
widgets by label.
Its path in the NDK carries the install location into object and module
names, which ThinLTO hashes into symbol names. Builds on different
machines then got different build IDs, so F-Droid could not reproduce
the release library. The relative NDK path map is no longer needed.
Without a reachable display SDL falls back to its offscreen or dummy video
driver, and the app then ran invisibly forever. WindowVisible reports that,
and OpenRaylib now fails instead.
Joystick and the cell-by-cell TileMap took the keys after their own, so an
application's next keys could collide and Android closed the app. Parts now
use WidgetPartKey. Android errors reach the system log with the frame step
and key that failed.
SwipeArea takes repeat_seconds: a swipe that stays down steps its way at once and then repeats like a held arrow key, and a press held in place reports held steps towards itself. Without it, steps still come only on release.
A shared app such as Self's profile painted its own fixed greens, so it
ignored the theme of the app hosting it. kryon/app_theme's AppThemeColor
asks the host for a theme token's colour and keeps the app's own colour on
a host that lacks the token or predates the module.
A page that stays the same while something else moves, such as a chat
under a practice in its small window, ran its whole program every frame:
on a slow phone, half of each frame of Lumi. HostedAppRunFrame records a
quiet frame, one the host says nothing reached and that does not
animate, call by call through HostedAppCall. Later quiet frames ask its
recorded reads again and, when every one answers as it did, make its
widget calls again with the arguments they had, so the page, its hover
and its tree stay live while the program does not run. A read that
answers differently runs the app; a widget that does, such as a scroll
still settling, runs it for a while before quiet frames are recorded
again. Calls reach the host through the replay state, which stays where
it was made wherever the host keeps the app.
The graphics test imports the retained test's Raylib host beside its own,
which already defines ClearBackground, so e17dd275's stub there stopped
the graphics test linking. The retained test now defines it itself.
rows, primitive, profile_header, drag, drag_drop, popup_policy,
popup_ownership, paragraph, route, window_policy, app_shell_layout,
capability_layout, locale_defaults and preference_policy, with their
laws, props and tests: about 2,500 lines that no app, host or other
Kryon module imports. They were ports of the C runtime's policy layer
that apps never took up, and several repeated helpers kept elsewhere,
such as a second pixel scale and a rectangle constructor.
A compact item marked closeable draws an X in its corner. A tap on the X
reports the item as closed and never as clicked; a tap elsewhere on the
item still clicks it.
Opening a bundle reads and checks its whole program, which takes a phone
up to a second for a large app, and Inner Breeze opened seven one after
another before its first frame. BundlePreloadStart opens bytes on another
thread; HostedAppOpenPreloaded takes the result, or opens the bytes itself
where there are no threads or the preload failed.
A host that intercepts a hosted app's widget calls, such as Werkzeug's
Android text bridge, must accept the package-qualified module names that
package builds give them. Its exact comparison missed them, so typing on
Android never reached a bundle's text field.
A screen of icons queued hundreds of rectangles per icon: on a Moto e6
the habit shop's grid of 75 symbols spent over half of each 95 ms frame
queueing and drawing them. A host can now register SvgIconUseTextures,
and each cached icon is then one image of exactly the pixels its cells
paint. raylib registers in OpenRaylib, or through RaylibUseIconTextures
for hosts with their own window, and drops the textures with a lost
context. A texture leaving the cache is freed only after 64 more have
left, so a frame that still queued it draws it. Other hosts keep the
cells.
GTK's first initialization switches the whole process to the user's locale.
With a decimal comma that broke portable app programs after a file dialog,
as the tray already guards against. Restore the previous locale right after
gtk_init_check.
A hosted game's board was one host call per cell: Pushy's 240 tiles
were the larger part of its frame on a phone. TileMap now hands the
whole map to the host as one call, which draws it with the native
TileMap. Each picture a cell shows passes the asset policy once, as
each cell's Image did, and the paint is the same: a test compares it
with a direct TileMap. Maps with more than 1024 cells, pictures or
names are still drawn cell by cell. The codec generator now encodes
slices of plain values such as []string and []s32.
A bundle could measure a line's width but not how tall a paragraph wraps,
so pages guessed from character counts. TextHeight returns the height
Text takes for the text in its bounds' width, from the host's fonts.
A game drawing its board tile by tile named each tile's image asset by
scanning every asset of its bundle, tens of thousands of name
comparisons a frame. Each open bundle now gets a table that finds an
asset by a hash of its name, dropped when the bundle closes. Pushy's
frames under the VM bench went from 2.3 to 2.05 ms.
A symbol beside a name or a coin beside an amount had no hosted widget:
only buttons carried icons. SvgIcon paints a Shape in the caller's color,
and bundles submit it to their host like the other widgets.
A screen with more icons than the 48 cached slots, such as a grid of
symbols to choose from, rasterized every icon again on every frame. The
cache now holds 256 icons, lets the least recently painted one go first,
and keeps each icon's rectangles, so painting a cached icon only queues
them. Painting a 55-icon screen at phone density went from 30.6 ms to
1.9 ms a frame.
A frame whose paint differed from the last one only in a small window,
such as a practice playing over a page, was painted whole. EndFrameDamaged
compares the frame's paint with the last frame's command by command and
reports the area the differing commands cover. A raylib host keeps its
previous frame's pixels outside that area with BeginRetainedDamage and
repaints only the commands touching it with PaintFlushArea. Presenting a
retained frame now clears the screen first, sparing tiling GPUs a load.
rlgl's GLES2 batch holds 2048 quads, a few dozen anti-aliased rounded
shapes, so a phone frame flushed it many times, each upload into the one
vertex buffer the tiling GPU had not drawn yet. Android now builds raylib
with a batch of 8192 quads in two alternating buffers: on the Moto, Habits
under a playing practice went from 26 to 31 frames a second and Lists
from 50 to 55.
A Text measured each line again for every word in it, and was laid out
twice a frame, so chat text cost most of a Moto frame. NextTextLine now
keeps the lines of recent texts, keyed by a hash of the text and its
layout inputs, while the host's glyph metrics revision holds. The raylib
backend now reports that revision, moving it whenever it loads, selects
or releases fonts, so TextArea's row cache also works there.
raylib's GetGlyphIndex scans every glyph of a font, and text looked each
character up three or four times to measure and draw it: on a Moto that
was a third of a chat frame. Each baked font now gets a table that finds
a glyph by hashing its codepoint, and raylib measures and draws the
character from a one-glyph view of the font, so its arithmetic and
fallback to '?' stay exactly the same. Unloading a font drops its table.
Adding TextWidth to text_widget changed the bytes of every portable
bundle built with it, including Inner Breeze's reviewed Apps controller,
which published app collections pin. text_widget is back to what it was;
TextWidth and its hosted call live in text_measure, which only callers
that measure import.
A portable app can lay out its own controls beside a label: TextWidth
returns the width Text would draw props.text with, in its resolved font
and typeface, and portable apps ask their host through a new hosted
call.
TileMap fits square cells in its bounds, centres the grid and draws each
layer's tile numbers as pictures from a tile list, over an optional fill.
It returns where the grid landed, and TileMapCell and TileMapCellAt turn a
cell into its rectangle and a point into its cell, so board games place
overlays and handle taps without their own layout code. Built from Box and
Image, it also works inside hosted games.
joystick: a Joystick that steps where it leans and repeats while held, and
a SwipeArea that reports a swipe's direction or a tap's position. Both are
built on Press and Box, so hosted games can use them.
app_asset: ReadAppAsset reads a file the app ships, which is an APK asset on
Android and an ordinary file elsewhere. The bundle runner now uses it.
AndroidPrivateDataPath gives the private files folder with links resolved.
Android reports it under /data/user/0, a link that private-file checks refuse.
The canonical Android host falls back to Android's system font when the app
loads none, and loads it again when Android recreates the graphics surface.
Tabs that did not all fit scrolled only with a wheel, so on a phone a tab
past the edge could not be reached, and revealing the tab before it left
it wholly out of view. Such tabs now follow a finger through the shared
scroll device's content drag, as a Scroll's content does: the same slop,
flick and coasting, a drag that moves them cancels its press so no tab is
selected, and a tap still selects one. The wheel still scrolls them, and
tabs that reorder keep their own drag. The bar marks itself as scrolling
by drag, so a drag over it moves the tabs rather than a scroll around it.
A tab revealed on selection now keeps up to 32 units of the tab before
and after it in view (TabBarRevealPeek), never so much that the tab itself
leaves the bar. ScrollDeviceContentDrag takes horizontal for content that
scrolls sideways; a text area's drag is unchanged. The tab bar test covers
the swipe, the tap after it and the peek.
TextProps.links marks web links in a Text's words. They are painted in
the theme's link color, as see-through as the text around them, with an
underline on each line they reach, so a chat can show a link once, inside
its message. TextLinkAt returns the link under a point from the same
layout, so the app can open the link that was tapped. Portable apps reach
both through their host: the links travel with the Text's props and
TextLinkAtHostedHost answers the hit test.
The live editor embeds the gallery's example sources. CI now rebuilds the
whole site before the browser check, so an example that changed since the
last published site no longer fails against stale editor assets.
AppReplyHost kept a view into the bundle's own reply string, which the
VM reclaims when the run returns. On Android the freed bytes were reused
while a host decoded them, so Inner Breeze read Diary's save reply as
unsaved and refused to leave Diary. The context now owns a copy until
the next run, and the app context test reads a reply with freed memory
overwritten.
Portable apps that import Kryon by package can now draw a text field and
a dialog with their own content, such as the shared Apps UI's Properties
dialog. Both modules already forward to the host in hosted builds.
Press reports right_clicked, with where, on the frame the secondary button
is released on its area, so a list can open an item's context menu. It is
never a click, and a disabled or modal-blocked area reports nothing. Hosted
apps receive the field through the widget codec.
The gallery check now expects TableView's data, notes and cell selection
instead of the former renderer gap. Kryon and the gallery pin the latest
Ziran, Kryon, Plot and DataViews.
The tree state check also ran the label check, which the test runner
already runs in parallel; both wrote the same saved IR, and one could read
a partially written module.
The locked Ziran builds and links on macOS. The Linux job now builds the
compiler and fetches locked packages before make reads its platform
builds, and installs the GL libraries the native ZIB players use.
A ContextMenuItem can name a parent item. That item shows › and opens its
submenu beside its row when the pointer rests on it, or when it is chosen
on a touch screen, and reports no command itself. The menu keeps the open
submenu in its saved state, so callers keep only open and the position.
Submenus nest, flip left at the view's edge, and a release inside an open
submenu keeps the menu open (DismissibleOverlayProps.keep_bounds).
Standalone AppContext bundles now run in the native, browser and Android
players with the shared lifecycle and hosted widgets, and save to a private
per-app directory. All players provide packed and HTTP audio, asynchronous
HTTP text and a monotonic clock. A display-free VM test covers drawing,
packed PNGs, retained input and Unicode for machines without a display.
On a touch screen, a finger dragged over a text area with more text than
shows now scrolls that text the way it scrolls a list: it moves once the
finger passes the same small distance, and a flick keeps it moving. The
caret and selection stay where they were. A tap places the caret where
the finger lifts, and a hold still selects a word. The page around the
text area stays put; when all the text shows, a drag scrolls the page as
before. With a mouse, dragging still selects text.
A text area with more text than shows now scrolls with the mouse wheel
while the pointer is over it, also when its caller passes no wheel and
the host only samples the shared scroll device, as hosted packages do.
The scroll around it leaves the wheel to it; beside it, or when its text
fits, the wheel still scrolls the page.
Hosts can pass a touchpad's sideways wheel with ScrollDeviceSideways. It
moves sideways scrolls toward the side it goes and leaves upright scrolls
and text areas alone; sideways scrolls still move with the vertical wheel.
The test driver can send a sideways wheel with wheel_x.
TestDriverPointer now returns the platform's pointer for a session that is
not valid, and so uses its session argument: a host built with -Wextra
-Werror no longer fails on it as unused.
A frame that takes a keystroke still paints its old value; the edit shows
from the next frame. The caret and selection were placed at the cursor
after the edit, so a key typed at the end of a line put the cursor past the
old line's end, and for that frame the caret was painted at the start of
the next line: a second caret flickering there while typing.
TextAreaPaintedOffset maps the caret, the anchor and the painted selection
onto the painted value: where the bytes the edit replaces end. The cursor
the area returns is unchanged. 9a2ee0a7 tests it; its message wrongly says
this change landed in 01b1b3db, which 46b28e05 took it back out of.
A frame that takes a keystroke paints its old value, but placed the caret
at the cursor after the edit. Typed at the end of a line, that cursor lies
past the old line's end, so for one frame per key the caret was painted at
the start of the next line: a second caret flickering there while typing,
which Inner Breeze's Diary showed. TextAreaPaintedOffset now maps the caret
and selection back onto the painted value (where the replaced bytes end);
that fix reached master inside 01b1b3db.
The widget test types at a line's end with a line after it, alone and with
a box under the line and a larger line after it, and counts the carets the
frame paints: exactly one, on the typed line. Without the fix it fails.
The word-selection commit picked up unfinished TextArea edits that another
change was still making in the same file. This puts the file back to the
word and Shift selection alone; those edits stay in the working tree for
their own commit.
A TextArea selected only by dragging. A second press on the same text
within the double-click time and distance now selects the word under it,
and a press with Shift extends the selection from its anchor. The host
passes its monotonic clock in TextAreaInput.now_seconds; without a clock a
double click stays two clicks. A third press starts over with a caret.
A Text with a fixed height leaves out wrapped lines that start below its
box. It now records how many (TreeSetHiddenLines, TreeEntry.hidden_lines),
and the test driver reports them per node, so a UI test can catch a label
cut off at a large scale without reading screenshots.
Apps drew lines at an angle, circles, arcs, triangles and gradients with
raylib calls of their own, outside the widget tree. Line, Circle (with an
optional fade from centre to rim), Ring (whole or an arc) and Triangle now
draw them as decorative widgets like Box, and BoxProps.fill_bottom fades a
box's fill from top to bottom.
Each queues one paint command whose inputs the paint queue compares, so an
unchanged frame stays reusable. Kryon cuts the shape into triangles, clips
them to the parent's clip, and hands each colour's triangles to the host in
one RasterTriangles call, which raylib, the canvas, Cairo, the pixmap host,
Plan 9's libdraw and the terminal implement. The canvas fills a call as one
path, so its antialiasing leaves no seam between triangles.
A line of text with several pictures in it draws them all: a line's
blocks follow it in list order, one under another, and only its first may
take the place of its last row with cover. Content height, carets, presses
and painting walk all of a line's boxes; a press inside any of them is the
end of the line. A list where a later box of a line covers it, or whose
starts go back, is ignored as a whole, as before.
Tests: two boxes after a covered line and after a shown line, in every
target and bundle; both boxes of a line paint their picture.
A TextArea can now preview a markup language such as Markdown without
changing its value:
- blocks: a box under a logical line, or in place of its last row with
cover, drawing an asset fitted inside it, or a soft frame with a label
while the picture is missing. A press inside a box is the end of its line.
- lines: a logical line at its own size, which wraps, takes caret stops and
takes height at that size, as a heading does.
- italic: bytes drawn slanted with unchanged advances. Raylib leans the
glyph quads with an rlgl shear; other backends draw them upright.
Rows are placed by one walk shared by content height, carets, presses,
arrow keys and painting. During an IME composition, lines and boxes after
it move with the preedit. Each list is sorted, one entry per line at line
starts, or ignored as a whole; without them the layout is the plain area's.
The widget host passes the new fields to hosted apps and draws a box's
picture only when the bundle may draw that asset.
Tests: placement, carets, presses, row keys, line sizes, validation and
composition offsets checked against the plain layout in C, C++, Go, Python,
Rust and bundles; a covered line paints its picture and not its bytes.
With KRYON_TEST_DRIVER naming a directory, an app that calls the TestDriver
functions where it samples input answers a test's commands after each frame:
it lists the committed widgets with their kind, role, label, editor text,
bounds, visibility, focus and enabled state, finds them by label, role, key
or focus id, presses one through the app's own pointer path, types text a
few codepoints a frame, presses keys, holds the pointer for drags, and
reports how many frames in a row ended unchanged. Tests no longer have to
read screenshots to find a control. Without the variable nothing changes.
Upright JPEG photos made the asset loader read the file and decode it
through raylib images, which the test's stand-in raylib did not provide,
so the test no longer linked. The stand-in now provides them, and the test
checks that a sideways camera photo turns clockwise once and releases its
file and decoded image.
Apps import android_device on every platform, so the Windows build linked
the text menu's POSIX clock and failed: MinGW has no clock_gettime or
clock_nanosleep. Only the Android branch uses that clock, so it is now
imported there.
ImagePreview makes a small upright JPEG of an image file: the host decodes
it (raylib, or the browser on the canvas backend), then portable Ziran
scales it down by area averages, turns it by its Exif orientation and
writes a baseline JPEG, so every platform makes the same preview.
The raylib host now draws JPEG assets upright by their Exif orientation,
as browsers and GdkPixbuf already do: cameras store portrait photos
sideways and say so in Exif, which stb's decoder ignores.
make image-preview-test decodes the previews with Pillow and compares
every orientation, scaling, transparency and gray images, and reads the
orientation of both byte orders.
ScrollProps.keep_scrollbar shows the scrollbar and takes its width from
the content from the start, so content that can grow, such as a list
whose rows open, keeps its columns when it starts to scroll. With
nothing to scroll, the kept scrollbar takes no press, drag, fling or
hover.
HttpTransferPollLength reports how many bytes an answer has, on the
desktop, Android and the browser, so a binary answer with NUL bytes, such
as an encrypted file, arrives whole. HttpTransferPoll is unchanged.
A bundle could draw text, buttons, scrolls and tab bars through its host,
but no dialog, so an app had to fill a whole page instead. ModalFrame is
now a hosted widget: its props and result cross with generated codecs,
its action images pass the host's asset policy, and its open panel is a
scope the bundle Ends, counted with scrolls toward the host's limit.
Pressing a row's icon used to move the menu's highlight to that row, which
in styles where the highlight matches the chosen row made two rows look
chosen. The highlight now stays where it was.
A DropdownOption can name an icon shape and label for a button at the end
of its row. Pressing it reports the option in DropdownResult.action_index
and leaves the menu open without choosing the row, the way a translator's
language list downloads or removes a language beside its name. The icon
takes its row's text color, fills half its square as a touch target, and
shows a round tint on hover; the selected row's check moves before it.
TabBar painted its border as a box around the whole row and filled the
selected tab edge to edge, so tabs looked like a text field with a chip in
it. The bar's border is now a divider on the side facing the content, and
a tab's border is its indicator: a rounded bar under a centered label, or
across a closeable tab. Hover and press fills stay clear of both, labels
center in tabs without a close button, and hovering the selected tab no
longer hides its selected face.
A clicked segment or tab keeps keyboard focus, and the focus face replaced
its selected face, so the choice looked deselected until focus moved.
Selected now outranks focus; keyboard focus still draws its own ring.
Every ImageProps codec held room for 256 mesh points with a codec each,
about 74 KB, and buttons, title bars and every dropdown option embed one,
so hosted widget codecs grew by megabytes. The points now have no room in
the codec: a bundle still sends them, the Image effect validates and
decodes them into one host buffer (up to IMAGE_MESH_POINT_LIMIT), and an
image codec is back to about 2.7 KB.
raylib leaves a triangle batch on the last texture set, so the rounded
fills Kryon draws as plain triangles sampled a warped image's texture
when they came right after it, and a progress bar under a painted figure
vanished. The mesh hands the batch back to the default texture and the
smooth shapes bind it themselves; the raylib mesh pixel test now draws a
rounded fill after a mesh.
ImageProps.mesh holds a columns x rows grid of screen points; Image
stretches the picture across it, two textured triangles per cell, so a
painted limb can bend at its joint like a paper puppet. Mirrored grids
draw (nothing is culled), the bounds still clip, and fit, origin,
rotation and the style radius do not apply. A grid with too few points
draws nothing, and no placeholder covers its bounds.
The paint queue copies the points into per-session blocks when queued,
moves them with their node, and compares them in the retained snapshot,
so a moved vertex repaints and an unchanged grid reuses the frame.
RasterImageMesh draws the grid in every host: raylib (desktop and
Android) sends front-facing textured triangles in one batch, the web
canvas and Cairo draw each triangle through its affine transform under a
clip, the pixmap host and Plan 9 libdraw rasterize pixel centers with a
shared edge rule (bilinear when smooth), and the terminal shows a marker.
The bundle player, zib tool and frame replay bind it, and hosted bundles
send up to 256 points with a plain Image (a per-field slice bound in the
codec generator keeps every ImageProps codec small).
Tests: pixmap mesh test (C, C++, Go, bundles; copy, snapshot reuse,
mirror, bend, clip, seams), Cairo mesh test, RGBA canvas cases, web
canvas pixels and seam at three densities, hosted widget mesh, and a
raylib pixel test on a private Xvfb (make raylib-mesh-pixels-test).
ButtonProps.detail adds a second line in a slightly smaller, muted font,
such as which app a choice uses. A button measures to the wider of its two
lines and their combined height, centres both lines together beside its
icon or image, and screen readers announce the detail as its description.
A secure text field still never copies its text out, but its menu now
offers Paste, as Ctrl+V already did, so a password or API key can be
pasted on touch screens.
A TitleBar's trailing_width reserves room at its right for the caller's
own controls, such as an online switch, and the result's trailing_bounds
says where to draw them; the title stays centred clear of them, or takes
what is left on a narrow bar. Portable bundles can now draw a TitleBar
through the widget host, with its leading image and dropdown options
held to the host's asset policy.
Without libXRes, a clipboard image read compares the selection owner with
this process's windows, found by _NET_WM_PID in the window manager's
client list or among the root's children: ids of one X client agree above
bit 18. Asking the app's own hidden clipboard window no longer waits two
seconds, as on CI runners without libXRes.
A popup escapes the clip of the scroll area or dialog around it, and a
time picker sizes its popup to the window, so a picker in a dialog shows
its hours, minutes and actions in full instead of one squeezed row.
DismissibleOverlay now reports a press released on its backdrop or on its
panel's own background as tapped, whether or not that closes it. An
overlay that may not be dismissed, such as a guide, can treat the tap as
its own action, like going on to the next step. A law states that every
release the overlay receives is a tap, and a mutation keeps it honest.
An image with ImageProps.smooth set is filtered when it is drawn larger or
smaller than its pixels, so a detailed picture such as a sprite stays clean
instead of turning jagged. The raylib host builds the image's mipmaps where
the GPU allows them and filters it trilinearly, once per loaded image;
browsers draw it with their image smoothing. Buttons, dropdowns and the
navigation bar pass the flag on with their images, and images without it
keep their sharp pixels.
While typing is set, Text paints only its first typed characters, as if
they were being typed. A character is a grapheme cluster, so an accented
letter, an emoji or a CJK character never shows in part. The text keeps
the whole text's layout, size and accessible label, so no word jumps to
the next line as it appears and screen readers always read all of it.
TextCharactersEnd gives the byte offset where those characters end.
TimePicker shows an optional Clear action beside Now and Done. It takes
the time away, back to its placeholder, and closes the popup; the
actions share their row in the order Clear, Now, Done.
TitleBar and ModalFrame can draw their title strong, with the same
emphasis Text gives its strong ranges. A ModalFrame can also start its
title at its content's edge, or after its left action, instead of
centring it, for a dialog whose fields line up below it.
Press, the area that reports a click, a hold and where the pointer is,
was only reachable by its own module path, so a package such as Plot
could not use it. The Widgets module now exports it with the other
widgets.
TimePicker shows a time as 24-hour HH:MM, or a placeholder while no time
is chosen, and opens an hour and a minute column at the current value. A
tap, a finger drag or fling, or the mouse wheel picks and scrolls; Down
opens it, the arrow keys step a column and wrap within it, Left and Right
switch columns, and Enter or Escape closes it. Optional Now and Done
buttons set the current time and close the popup. The time changes as it
is picked, so closing never loses a choice, and the popup stays on screen,
opening above the field when there is no room below. The picker takes the
dropdown's look from every style, light or dark, and portable apps can draw
it through the widget host.
Dropdowns now follow Kryon's light and dark system palettes; a dark palette
left their field and menu light before.
`make -C examples time-picker` builds a window that shows the picker in
each of its states.
A checkbox's check was a stack of one-pixel lines, which looked jagged
and grew thinner on its steep side. PaintStroke now paints a line through
up to eight points as a smooth stroke with round ends and joins, through
the same rasterizer as icons, so it is anti-aliased alike on every host
and at every scale. The checkbox draws its check with it, and an
application can draw its own checks the same way.
A toggle with Off and On labels grew to the right past its bounds when
its labels needed more room, so it spilled out of its card. Given less
room than it needs, a toggle now keeps to its bounds: each label stays in
its own half and the switch shrinks to fit. A size of 0 still takes the
natural size, and ToggleMinimumSize tells a layout that size, so an
application can give the toggle the room it needs.
Before Android 11 a resizing window can report the keyboard only in its
visible frame: on a Moto e6 play (Android 9) the root insets gave 84 px,
the navigation bar alone, while the keyboard covered 588 px, so
PollAndroidWindowInsets saw no keyboard and Werkzeug's sync code field
stayed hidden behind it. The poll now also measures how far the keyboard
reaches up from the window's bottom with getWindowVisibleDisplayFrame and
getLocationOnScreen and keeps the larger of the two. The JNI table gains
NewIntArray and GetIntArrayRegion, checked against the NDK on every ABI.
Tested on the Moto: the focused field and its button stay above the
keyboard. The JNI layout, Android device and surface tests pass.
An activity without the httpCreate transport, such as a plain
NativeActivity, now gets one detached native worker per transfer, at most
eight at a time. The worker attaches to the Java VM and drives
java.net.HttpURLConnection through JNI, so TLS and certificate checks stay
the system's; redirects and caches are refused. Like the desktop worker it
owns copies of the request and writes the answer only into its own memory,
and a poll copies it out; a cancelled or timed-out transfer is abandoned
and the worker frees it. Methods, URLs and header names must be visible
ASCII, header values ASCII text.
The desktop and Android workers share the pthread lock and thread start.
The JNI table gains IsInstanceOf. kryon/http_transfer is exported.
Tested: Werkzeug on an Android 15 emulator, with no Java code, created a
Daochi account on api.waozi.xyz, connected a desktop with a code, and
synced a record each way. The desktop and browser transfer tests and the
JNI layout test pass; the generated C compiles for armv7a, aarch64 and
x86_64 with the NDK.
A plain NativeActivity has no Java to report its insets, so Kryon laid
such an app out under the navigation bar: Werkzeug's bottom buttons sat
behind the 3-button bar on a Moto e6 play. PollAndroidWindowInsets reads
the system bar, keyboard and cutout insets from the decor view's root
insets through JNI a few times a second (getInsetsIgnoringVisibility on
Android 11 and newer, stable insets before) and stops once Java reports
them. The JNI table gains GetFieldID, GetIntField and
CallStaticIntMethodA; tests/ziran_android_jni_test.sh checks them
against the NDK on every ABI.
A font file packed in the APK did not load by its relative path, because
raylib's FileExists cannot see APK assets although its file loader can.
Android 9 and older cannot name a system font, so such an app fell back
to raylib's pixel font. The typeface loader now also accepts a path the
file loader can read.
Hosted bundles can now step numbers with the standard Spinbox. The
regenerated codec also carries TextField's numeric flag, which was
missing from the hosted boundary.
A press that focuses a numeric text field selects its whole number and
keeps it selected through the release, so typing replaces the number
instead of adding digits to it. The field remembers the focusing press on
its node while the pointer is held; taps in an already focused field place
the cursor as before.
TextFieldProps.numeric accepts only the digits 0-9 for typed, pasted and
input-method text, and asks the platform for a number keyboard: Android
receives it through setTextInputState, which now takes (JJ[BIIZZZ)V with
numeric before multiline, and the web editor sets inputmode=numeric.
The Android device test host also stubs SetMouseOffset, which
android_surface has needed since 468d6326, so the text editor test links
again.
A key held down now reaches the app again with every OS key repeat, so
holding Backspace keeps deleting as in any text editor; before, only the
first press was sent. The SDL desktop backend already passed repeats.
A Text with TextWrapEllipsis lays out on one line like TextWrapNone, and
when the line is wider than its bounds it keeps the start that fits,
ending on a whole character, followed by "...". A new wrap value keeps
TextProps unchanged for hosted UIs; an older host treats it as no wrap.
Android gives a raised window, such as the floating picture-in-picture
window, a surface larger than its frame by the shadow on every side, and
keeps that margin after the window opens back to full screen. Kryon drew
from the surface's corner, so the app sat 18 pixels too high and too low
and lost 18 pixels at each side on a 1.75x phone. An activity now reports
its frame size; the viewport lies in the frame's part of the surface and
raylib's mouse offset moves touches there too.
Asking the clipboard for an image sends a conversion request to its owner.
When the application copied the text itself, the owner is its own window,
which can only answer from the event loop that this read blocks, so every
paste of the application's own copy froze it for the 2-second limit.
The X-Resource extension now names the owner's process; for this process
the read reports no image immediately. Without libXRes, owners are treated
as before.
The menu was sized against the whole window but drawn inside its scope,
so in a page that ends above an app's navigation its last rows were cut
off and, as they seemed to fit, could not be scrolled to. The menu now
fits the window area its scope shows, stays in the page and scrolls.
A dropdown's menu sat on a modal overlay whose full-window backdrop took
every press: tapping the app's sidebar only closed the menu, and a second
tap was needed to switch screens. The menu is now a Popup: drawn and hit
above the page like a modal, with no backdrop and no input blocking. A
press outside the menu and its trigger closes it and still reaches the
control it landed on.
Tree nodes can be popups (TreeSetPopup). They raise their subtree's paint
and hit order like a modal, but only modals block input
(TreeModalLayerAt), and scroll targeting prefers the topmost layer.
Presses are counted (TreeLastPress), so a popup closes only on a press it
has not seen.
An icon's raster cells were edge / size layout units and started at the
icon's own, often fractional, position. Their edges then fell inside
screen pixels, where the host anti-aliased each one, and the strokes
showed faint stripes, most visibly on the web canvas. Each cell is now
exactly one screen pixel and the icon's corner snaps to the nearest
screen pixel, so cells meet on whole pixels.
Icons are drawn from their SVG paths in software, at PaintPixelScale()
screen pixels per layout unit. The web canvas draws over a backing store
of devicePixelRatio pixels per CSS pixel, but only a zoom set that scale,
so on a 2x screen every icon was rasterized at CSS size and stretched:
soft, blocky edges. The canvas host now reports its density each frame
(SetPaintDeviceDensity), and the pixel scale is the zoom times that
density; native hosts, whose framebuffer is their window, keep 1.
The open menu's rows now sit in a standard Scroll, so the wheel, a
finger drag and a fling move it by themselves and it draws the shared
scrollbar. Before, it scrolled only by a caller-supplied wheel prop or
by dragging its own thin thumb, so a menu longer than the screen could
not be scrolled on a phone. A drag that starts on a row scrolls without
choosing it; a tap still chooses. The menu opens at the selected row and
keyboard movement keeps the highlight in view.
The dropdown keeps its open state, highlight and scroll privately on its
retained node: DropdownProps loses highlight_index, scroll_offset and
wheel, DropdownResult loses highlight_index and scroll_offset, and the
navigation bar editor, title bar and toolbar stop passing them through.
CI names its Ziran checkout with ZIRAN_ROOT and has no ziran command, so
tools/performance.py stopped before measuring. It now resolves Ziran the
way the test helpers do.
A press used to move the focus to the control under it at once, so
starting to scroll a list beside a focused text field (Lumi's command
list) blurred the field and Android closed the soft keyboard. While a
text field has the focus, a press on another control now takes it only
when it lands as a click; a press a scroll takes over leaves the field
focused. Presses on text fields, and presses with no text field
focused, focus at once as before.
The test ran ImageMagick's import to capture one pixel, and the library
test job has no ImageMagick. Pillow, which the test already uses, grabs
that pixel from the private display directly.
SDL_PollEvent stops at the marker its last pump left at the end of the
queue. When the host woke while another thread was still pushing input,
that marker landed between the pushes, so PollDesktop returned the key
and left the text and click for the next frame. CI's desktop wait test
failed this way. PollDesktop now pumps once and takes every queued event.
The test now covers a marker between two pushes, which fails without this
change.
The desktop examples link the libraries the desktop host now uses and
generate only what their main reaches, as projects do; they had stopped
linking.
The runner had no GStreamer, so the native video test could not open its
fixture and exited 4 without a message; the base, good and libav plugins
decode it on Ubuntu 24.04. The video test now prints why a video did not
open, the desktop wait test shows its program's output and status when it
fails, and the test runner reports every failing script's exit status.
The Windows typeface boundary links without Raylib and depends on the
optimizer dropping calls Windows never reaches. Sanitizer instrumentation
keeps those calls in the C++ build, so that link is built uninstrumented.
The prefetch ran under the sanitizer job's CC, so building the pinned
Ziran used AddressSanitizer and broke its 16 KB frame limit. The host
job also needs Pillow and ffmpeg for the image and video tests.
c8e99fdb recorded raylib at 987f5843, which is a Kryon commit: the local
raylib override was an uninitialized submodule, so Ziran read the
enclosing checkout's HEAD. CI could not fetch it, and every test that
needs raylib failed. ziran update raylib restores fafa2cea.
Flag 32 is NATIVE_WINDOW_STICKY, but the secondary window host read it
as resizable, so a sticky break overlay opened resizable and reported
clicks on release instead of dragging. Resizable is now
NATIVE_WINDOW_RESIZABLE (64).
The sanitizer job lacked SDL2, GLib, Pango, Pillow and ffmpeg, and the
host job lacked xmodmap, so those tests failed before running. Parallel
tests also fetched the same locked package at once, and offline ones
found none; behavior-tests now fetches them first.
The visual viewport, narrowed to the canvas frame, the canvas's parent or
the canvas, measured in Zi through the web bridge; and a debounce that
resizes only once a new size has held for two frames with no pointer
down. Moved from Inner Breeze's JavaScript and web window code so raylib
web builds share it.
The activity's document picker and camera scanner answer later, so a
numbered request is opened and polled each frame; each answer is taken
once by the request that asked, and a newer request replaces one still
waiting. Moved from Inner Breeze so other Android applications get it.
Applications that build every module for every platform can import it
directly; outside the browser it opens nothing and its polls report a
closed socket.
page_socket opens a WebSocket through the web bridge and queues its text
messages for polling each frame. Binary or oversized messages, a full
queue, or no open after ten seconds close the socket, and URLs with
credentials are refused; a token travels as the second subprotocol. A
headless-browser test runs against a small local WebSocket server. It
replaces Inner Breeze's JavaScript socket.
ExportBytes and ExportFile download a file in the browser, through a
blob link built on the web bridge, or open Android's share sheet through
the activity's shareFile. A headless-browser test checks the downloaded
names and bytes. It comes from Inner Breeze's data and account export.
fseek and ftell take a C long, 32 bits on wasm and 32-bit Android, so
file_export and file_download now declare it as isize.
android_text_editor lets an activity's input connection edit the focused
field as UTF-8 snapshots through TextRequest, so composition, autocorrect
and suggestions work. Stale revisions, a replaced field's late edits and
edits after blur are refused. android_device's text input calls it, and
falls back to code points when the activity has no input connection. It
comes from Inner Breeze.
The Android test host no longer replaces dlsym, which AddressSanitizer
needs at startup; the real one finds no raylib state either, so the
Android device tests now also pass under the sanitizers.
The window close checks need SDL2, which the sanitizer job lacks, so they
skip there after compiling every platform. The raylib trace and
secondary window tests use the RAYLIB_A that CI provides instead of
fetching the raylib package.
file_download fetches a large file, such as music or an app package, to a
path while the application keeps drawing; the file appears there only
once complete. Linux and BSD desktops run curl as a child process, the
browser streams fetch's body into the page's file system through the web
bridge, and Android asks the activity, whose callbacks the application
binds to FileDownloadNative*. Native and headless-browser tests download
from a local server. It comes from Inner Breeze.
The worker's call record held a Ziran function value larger than the two
pointers allocated for it, which AddressSanitizer reported as a heap
overflow. The thread now receives the job itself and runs NativeWork.
Build instructions install the ziran command and use the toolchain locked
in ziran.lock instead of a ../ziran sibling checkout. Downstream apps pick up
Kryon changes through ziran.lock. Terminal owns OSC 52 and bracketed paste.
The website no longer calls the migration underway, and its status page
lists the Android host, Zib desktop apps and opt-in DOM CSS layout.
The obsolete files (shell.nix, .ini themes, old site images, the duplicate
API redirect) were removed in 827eae3d, which picked up these staged
deletions.
http_transfer runs HTTP requests while the application keeps drawing:
curl on a detached worker thread on desktops, the activity's transport on
Android, and fetch through the web bridge in the browser. A cancelled
transfer never writes into the caller's buffer, answers that do not fit
fail instead of arriving cut, and only http and https URLs are accepted.
Native and headless-browser tests run against a local server.
raylib_secondary_window gives a raylib application on SDL up to three
extra windows, each drawing its own Kryon tree into a render texture that
is copied to the window, so the main OpenGL context stays current. Its
probe runs on a private Xvfb display.
Both come from Inner Breeze.
These come from Inner Breeze so any Kryon application can use them:
- file_picker: zenity on Linux and BSD, Windows' common dialog, and the
browser's file chooser through the web bridge, which copies the chosen
file into the page's file system. A browser test answers the chooser in
headless Chromium; a fake zenity checks the arguments natively.
- window_close: close requests for the application's own SDL or Win32
window.
- idle_time: session idle time from Mutter or the freedesktop screen saver
over D-Bus, and whether the session is Wayland.
- notification_desktop: the notification host for Linux and BSD through
notify-send.
- raylib_trace: raylib's log to the console or logcat with routine notes
dropped, or to a log file for Windows applications without a console.
open_uri opens a URI with the platform's handler: the desktop opener as a
child process, Windows' shell, Plan 9's plumber, an Android ACTION_VIEW
intent or a new browser tab through the web bridge. It moves here from
Inner Breeze so any Kryon application can open links.
android_jni's NativeAndroidApp now carries every field of the glue's
android_app, including the command pipe, and AndroidInternalDataPath
returns the app's files folder. A test checks the layouts against the NDK
headers for all four Android ABIs.
Buttons with swatch set drew the style's fill, so every colour choice in
an app's picker showed the theme colour instead (Inner Breeze's new-habit
colours were all purple under a purple theme). The swatch colour now fills
the button, half transparent when disabled, and the chosen swatch carries a
light ring with a dark edge that shows on any colour. The old header-based
path drew swatches; the Ziran button lost it.
A press in scrollable content arms the content drag at once, and moving
past the threshold then scrolled the list and cancelled the press, even when
the press had become a hold that selects. An armed drag that has not moved
now lets go when a widget claims the press, so holding an item and dragging
selects across the list; without a hold the same drag still scrolls.
Holding a list item to select it and then dragging should select more
items, as in Telegram, but an enclosing scroll took the drag and cancelled
the press. TreeCapturePressAt lets a widget claim the current press, and
Press claims it once it becomes a hold, so the scroll no longer takes the
gesture; before the hold the scroll still can, so lists keep scrolling.
A bundle built with KRYON_HOSTED_UI now calls PressHostedHost, and the
widget host draws the press area in the host's frame and returns its press
state, so a hosted app such as Lumi can select messages by holding and
dragging. The generated codec gains PressProps and PressResult.
Applications that run another .zib in their window each opened the
bundle, checked its capabilities, bound them, limited its steps and kept a
working instance through restarts. hosted_app does that once:
HostedAppStart asks the host about every capability and binds them to one
HostCall with field names matched, HostedAppRun runs under a step limit and
marks a trap as failed, HostedAppRestart closes the old instance only once
the new one passes the host's handshake, and HostedAppAsset finds a packed
asset by its exact path.
Lists that select items like Telegram need to know when a press becomes a
hold and where the pointer goes while it lasts; buttons only report clicks.
Press is a button-kind area that paints nothing and reports a click, a hold
after half a second by default, the pointer while the press continues and
its release. The app passes its clock, as for scrolling, so hosts need no
new clock. Capture keeps the press when the pointer leaves the area, for
sweeping across items; without it an enclosing scroll can still take a drag.
Apps laid out tiles of one height with fixed column counts because the grid
gave only its metrics and a cursor. GridRowCount, GridCellsHeight,
GridCellBounds and GridIndexAt work from MeasureGrid's columns, so a tile
grid reflows with the width and can still place overlays on its tiles and
find the tile under a dragged item.
An application that runs a .zib inside its own window answered each
widget's HostedHost call with its own codec and dispatcher. Kryon now owns
that host side next to the bundle side: widget_host draws a bundle's widgets
in the frame's session, refuses calls from another frame, foreign records,
texture handles and assets its host's callback rejects, and closes scrolls
the bundle leaves open. WidgetHostSupports lists the calls it answers,
including Toggle.
widget_codec is generated from Kryon's widget records by
scripts/generate-widget-codecs.py, whose --uses option lets an application
generate codecs for its own records on top of Kryon's. hosted_values holds
the shared helpers: fields match by name, so a bundle and its host may be
built against different layouts.
Tab already moved the session focus between controls, but buttons never
painted it, so keyboard navigation looked broken in every app. A button
focused by Tab or Shift+Tab now draws a ring just outside its bounds in the
style's focus color, or the default focus blue.
The focus is visible only after keyboard navigation, as with :focus-visible
on the web: a pointer press still focuses the control but hides the ring.
Enter and Space press the focused control only while the focus is visible,
so after a click those keys stay with the application, which may use them
as shortcuts, instead of pressing the clicked button again.
A behavior test covers Tab, Shift+Tab, wrapping, skipping a disabled button,
the ring, Space and Enter, and a click handing the keys back.
Emphasized text was a second copy of the label shifted one logical unit.
Raylib snaps each copy to screen pixels, so at 110% the copies landed one or
two pixels apart, and on phones two or three, leaving a light seam inside
every stroke that made bold look blurry and doubled. A backend can now
register an emphasis raster. Raylib's thickens each glyph by whole screen
pixels, about one per 24 pixels of text. Other backends keep the logical copy.
Spreading image decoding over frames reset its 4 ms budget only in
BeginRaylibFrame. Hosts with their own loop, such as Inner Breeze, never
call it, so once the budget was spent every later image stayed loading for
good: Inbe's Meditation and Sun Salutation pictures never appeared. The
budget now also renews once a frame interval has passed.
Every JNI call attached the frame thread to the VM and detached it again,
so Android created a Java thread each time; with a per-frame call that
was several percent of a Moto e6 play's frame. The host thread now stays
attached and AndroidRunMain detaches it once when its loop ends; other
threads still detach after each call.
AndroidJniFinishActivity passed the activity's Java object to
ANativeActivity_finish instead of the native activity, so the back key
crashed the app instead of closing it.
A photo grid scrolled into view decoded every new thumbnail in one frame,
about 4 ms each on a Moto e6 play, so a fling stalled for 50-100 ms. A
frame now decodes images until 4 ms are spent, always at least one, and
reports the rest as loading: ImageWidth/ImageHeight return -1, RasterImage
draws nothing without an error, and the Image widget shows no placeholder
for a loading image. The graphics and image widget tests cover both.
An unrotated image larger than its clip, such as each cover-fit tile of a
photo grid, went through a scissor, and ending it flushed the draw batch:
one GPU submission per thumbnail took 44% of a Moto e6 play's frame. Such
an image now draws only its part inside the clip with the matching source,
as rounded images already did. The graphics test checks the crop and that
no scissor is used; the raylib clip pixel test still passes.
Every image draw and size query scanned the texture cache comparing whole
paths, and a photo grid's thumbnail paths share a long prefix: on a Moto e6
play the lookup was 16% of each frame. Each entry keeps the path's FNV-1a
hash, and bytes are compared only on a hash match.
SystemPaletteInstall gave every button the neutral button color, so
accent, success and danger buttons turned gray and ghost, outline and link
buttons got a filled background. Each tone now takes its palette role
(accent is the selection color), only filled and soft buttons get a
background, and neutral buttons that are not filled use the text color.
tests/ziran_system_palette_buttons_test.sh covers tones, emphases and
states.
Icons were rasterized at their layout size and then scaled with the frame,
so at phone density or desktop zoom they looked blocky. A host that scales
the frame now reports its pixel scale (SetPaintPixelScale; the raylib host
does so with its zoom), and PaintSvgIcon rasterizes at that resolution, up
to 96 pixels across. tests/ziran_svg_icon_scale_test.sh checks the finer
cells on the portable VM and C.
The raylib host cached 32 image textures, fewer than a phone photo grid
shows at once, so every frame evicted and reloaded thumbnails. The cache
now holds 128 (RaylibAssetCapacity) and the eviction test follows the
constant.
Kryon's Android host handed applications physical pixels, so a phone at
density 1.75 drew every size and font at desktop scale. The host now sets
the frame zoom to the device density (AndroidLayoutZoom, clamped to
Android's range), passes bounds in dp and clears the viewport in those
units, so sizes mean the same on every screen.
A press re-hits the text each frame while it is held. When the text under
the pointer shifted, as Markdown markers appearing on the line just pressed,
the stationary press became a selection from the old byte to the new one.
A press that has not moved now places a caret at its current hit.
An editor that shows Markdown as formatted text needs its markers kept in
the value but out of sight away from the line being edited, and the marked
words drawn bold. A text area now takes hidden and strong ranges: hidden
bytes take no width, paint or caret stop, while wrapping, the caret,
clicks, selection and keyboard composition measure the shown text. Strong
bytes use Text's extra stroke, so advances never change. The row cache keys
on the hidden ranges.
A text area or field asked to focus through its input became focused for
that frame only. The session focus stayed on the node that held it, often
the button pressed to make the request, so the next frame gave the focus
back to that button and typing stopped reaching the field. A blur already
releases the session focus; a focus request now takes it.
raylib 5.5 removed FilePathList.capacity, and native hosts already read the
two-field layout. The canvas backend still returned the old three fields, so
web hosts that share the native layout read the wrong count and freed invalid
pointers at startup. Track growth in a local capacity instead.
A focused editable TextField or TextArea now notes itself for the frame,
and TextInputFocused reports it to hosts. Android hosts show the soft
keyboard for it without the app listing every input.
Grow owned snapshot bytes with the accepted plan, compare complete spans across blocks, and release storage on disposal. Cover large label and image-path plans, changed bytes, temporary ownership and embedded NUL spans.
The tree now carries a small widget state per node between frames
(TreeSetWidgetState, TreePreviousWidgetState). Dropdown keeps whether its
menu is open, the highlighted row and the scroll offset there, so a
caller passes only the selected value. Before, every caller had to hold
the returned open state and pass it back; any caller that did not got a
menu that closed again in the next frame. props.open still opens a menu
from code, and the new props.close closes it.
raylib's Android backend applies every queued touch event once per frame
and ignores where a touch lifts. On a slow frame a tap or quick swipe was
lost entirely, and a quick swipe without movement events looked like a
tap. android_touch wraps raylib's input handler, records where each touch
began and lifted, and TouchReplayStep reports the release where the finger
lifted or replays a whole touch over two frames. The release frame of a
swipe also keeps the speed the finger had.
A phone applies every queued touch event once per frame, so on a slow
frame a quick swipe arrived together with its release. The release frame's
movement was ignored and the first movement had no speed, so the content
did not move or coast. The press now starts the speed clock, the release
frame's movement scrolls, and a drag that starts on its release cancels
the tap.
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.
Opaque host surfaces write their alpha while rasterizing, and retained paint invalidates when that format changes. Rounded fills blend constant-color interiors as bounded row spans, retaining the existing corner sampler and exact integer blending.
Extend surface parity to C, C++, Go, Rust, Python and source/saved portable bundles. Retained frame, density, sanitizer and Harmony cursor/damage/private-Xvfb checks passed. Paired synthetic Harmony scroll medians fell 18-22%; typing and t9 timings were essentially unchanged, with no added buffer storage or measured soak growth.
GTK starts an open dialog on its Recent view, which is empty when no
recent file matches the filter, so the chooser looked blank. Open the
caller's folder, or the user's home folder, instead. Set the filter's
name before adding it: the chooser copies the name at that moment and
otherwise shows "Untitled filter".
The Linux clipboard test pastes images that xclip and a GTK owner serve on
a private Xvfb, and links its probe against SDL2, cairo, FreeType and
fontconfig. The library job had none of these, so make test stopped there.
Publish immutable typeface snapshots, close theme and CSS views before reusing their buffers, and keep template row storage local to each frame. Template tests use explicit local overrides against the canonical checkouts. Verified the full make test gate, including 111 behavior scripts, source/saved-IR style snapshots on the VM/C/C++/Go, browser semantics, and private Xvfb clipboard checks.
Ctrl+V in a TextField or TextArea whose clipboard holds no text now
leaves the selection alone and reports paste_without_text, so an
application can attach what was copied instead. SystemClipboardLinux
reads that image: it asks the X11 (or XWayland) clipboard owner for
image/png and receives it whole or in INCR increments. libX11 is
loaded only on the first read.
The paste test runs on a private Xvfb display. A desktop probe presses
Ctrl+V in its focused field and receives images a GTK owner copied,
including one large enough to need INCR. The test also reads xclip's
bytes exactly and covers empty, text-only, oversize and no-display
clipboards.
Overlays paint above later page content, so content submitted after a
ModalFrame without its panel scope drew under the opaque panel and the
dialog looked empty. ModalFrame now opens the panel scope while the
panel stays open and reports `opened`; callers submit content and End
it. ActionModal and NavigationBarConfig use it.
Sliders take a caller-formatted `value_text`, shown at the end of the
label row, restoring the value display the old Slider `format` had.
Hosts can register borrowed ARGB pixels and paint them through ImageProps with scaling, tint, transparency and rounded clipping. Preserve placeholders for unresolved assets.
Validation: pixmap surface source/saved C, C++, Go and portable bundle checks pass. The wider make test gate stopped during a template dependency fetch with No space left on device.
The pixmap font now carries all of Liberation Sans plus the symbol blocks
it lacks (arrows, math, shapes, dingbats, box drawing) from DejaVu Sans
and Noto Sans Symbols, so text no longer turns into question marks.
Format and variation characters take no room.
Color emoji come from Noto Color Emoji as 32px cells with their own
palettes, scaled with integer box filtering and cached per size. Emoji
presentation follows variation selectors; skin tone modifiers and tags
attach to their emoji. Every target still draws the same pixels.
Glyph masks are cached by glyph, size and sub-pixel origin, so repeated
text is no longer rasterized from outlines every frame. Text and glyphs
outside the clip are skipped, and opaque fills and full-coverage pixels
are written directly. Output is byte-identical on every target.
PixmapResumeInto targets a caller-owned surface without clearing it, so
a host that paints its own background can keep unchanged frames with
EndFrameRetained.
The package called itself Kryon while `ziran add kryonlabs/kryon`, the
repository, the kryon command, and import paths such as kryon/Widgets are
lower case, and applications were split between [dependencies.Kryon] and
[dependencies.kryon]. The package, templates, docs, messages, and tests now
use kryon: `[dependencies.kryon]`, `[tool.kryon]`, `tool = "kryon"`, and
`ziran tool kryon`. Ziran matches a package by name without case, so
[dependencies.Kryon] keeps working, but its [tool.X] table must use the
same spelling. The core module keeps its name, Kryon.
The desktop and libdraw hosts never chose a font, so Cairo drew text in the
system's default sans (Noto Sans here), while raylib and the browser hosts
used Kryon's Liberation Sans and the pixmap host bitmap glyphs. Text
differed in face, width, and line breaks from host to host.
- The Cairo hosts load assets/fonts/LiberationSans-Regular.ttf through
FreeType (KRYON_FONT_PATH, which `kryon run` sets, else the system's
copy, else fontconfig by name) and lay glyphs out at their unhinted widths
with gray anti-aliasing, as a browser does.
- The pixmap host rasterizes Liberation Sans outlines itself: contours with
implied on-curve points, quadratics flattened in 1/256 pixel, non-zero
winding coverage from five sub-scanlines with exact spans, all integer.
It places every glyph where Cairo does, and every Ziran target still
prints the same bytes. tools/outline_font.zi, run as Python, extracts the
outlines of 207 Latin glyphs (`make pixmap-font`); Terminus is gone.
libdraw finds plan9port without a fixed sibling path: the installed one
$PLAN9 names, or, when a project adds plan9port as a source package, one
Kryon builds once in its build directory; without either it says how to
add it. The kryon tool now builds its Ziran toolchain only when it is
missing, as ziran builds a pinned one, instead of remaking it on every run.
Packages can now import kryon/pixmap and bind it with --bind-host to paint a
Kryon frame without a display on any target, then read pixmap_pixels to save
it, for example as a chart image a bot sends.
It has ziran new and init with templates, [package] tool, --bind-host, and
the Rust, Python, Go, and portable-runner fixes the pixmap parity test found.
The pixmap backend paints a frame into a 960 x 600 pixel buffer with integer
arithmetic -- anti-aliased rounded fills and outlines from 4 x 4 samples,
Bresenham lines, Terminus Font bitmap text, image placeholders -- and prints
it as a PPM image. Every template gains a `shot` profile, so
`kryon run shot > frame.ppm` takes a screenshot without a display.
Because the raster has no floating point and no platform library, every
target prints the same bytes. `make pixmap-parity-test` builds each template
and example from one saved IR for C, C++, Go, Rust, Python, and the portable
runner, requires all six images to equal C's, and writes
build/pixmap-parity/grid.png. All seven programs match on all six targets.
tools/image_tools.zi, built for Python with zi2py, compares PPM images (pixel
count, largest channel delta, bounding box, red diff image), writes PNG, and
lays out labeled contact sheets. tools/pixmap_glyphs.zi, also run as Python,
turns the Terminus console fonts into src/backend/pixmap_font.zi
(`make pixmap-font`); the glyphs are OFL-licensed (licenses/Terminus-OFL.txt).
`kryon new hello` starts a Kryon application and `kryon run` runs it.
Outside `ziran tool Kryon`, the kryon command is a front door to ziran:
new and init are `ziran new`/`ziran init` with Kryon's templates, run,
build, check, and profiles are `ziran tool Kryon ...`, and install is
`ziran install`, so every project runs the Kryon its lock pins whatever
kryon is installed. `make install-user` installs it.
Templates, listed under [templates] in ziran.toml:
- app: a counter with buttons, a step slider, and progress (default)
- tui: a keyboard-driven task list for the terminal
- pages: Home, Library, and Settings behind tabs, sharing state
- web: a semantic page (headings, paragraphs, links) for the DOM host
Each template sets `tool = "Kryon"`, so `ziran run` works too, and lays
out rows in pixels in a window and in cells on the terminal host, so one
Frame serves every profile. `kryon init --template tui` adds a template to
an existing package without replacing its own entry; `[tool.Kryon] entry`
names the window's module.
Also: `kryon run desktop` takes the profile positionally, `kryon profiles`
lists profiles and marks the default, run asks for a profile only on a
terminal, `check` defines PLATFORM_WEB for browser profiles as `build`
does, and the static archive test finds Ziran in the org layout.
raylib fills shapes without anti-aliasing, so small rounded controls such
as Inbe's habit day dots showed stair-stepped edges. Curved shapes now get
a one-pixel edge whose alpha falls to zero across the true outline, sized
from the modelview so the frame zoom and 2D cameras both count. Edges on
pixel boundaries stay crisp; square rectangles keep raylib's fill.
The raylib clip test and the new smooth shape test take ZIRAN_DIR, so they
run in the organization layout as well as with a sibling ../ziran.
Five if/else-if chains that compare one value with three or more
constants (SVG path commands, key codes, text area actions, theme keys,
audio states) now read as Jai's `if value == { case A; ... }`, which
Ziran checks as the same chain and compiles to a switch where it can.
The UI and the touched backends check with both the pinned 07f12a1 and
the current Ziran; the SVG shape, key input, text area menu, and canvas
audio engine tests pass with both; all 29 law modules check; and Inbe
checks against this tree with its pinned and the current Ziran.
`ziran check --lint` found 43 casts that only widen a whole value, such
as float32 coordinates passed to Cairo, bytes read as s32, and s32 sizes
passed as s64. They are removed. Casts that set a range's index type or
the width of arithmetic stay.
The change is textual only: the generated C of the UI module and of every
backend that builds on its own is identical before and after, and all 29
law modules check.
This Ziran converts narrower numbers implicitly where no value can
change, so casts that only widen can go. `ziran check --project` reports
the same page_events.zi errors (CanvasEventKeyUp, CanvasEventKeyChar) on
this pin as on the previous one.
SVG path parsing and the Linux system theme reader compared bytes with
character codes written as numbers (65..90, 34, 58, 114). `ziran check
--lint` found 39 such comparisons; they now read #char "A", #char "\"",
#char ":", #char "r" and so on.
All 29 law modules and the public surface check, the SVG shape behavior
test passes on the portable runner and C, and Inbe checks against this
tree, each with both the current Ziran and the pinned 8bc31e8.
`ziran check --lint` found 21 casts that convert a value to the type it
already has, all cast(s64) on a count. They are removed; casts that widen
or set the width of arithmetic stay.
All 29 law modules and the public surface still check, and Inbe checks
against this tree with both the current Ziran and its pinned 8bc31e8.
With no option selected yet (has_selection false), clicking one reported
its index as selected_index but changed as false, so an app that waits
for changed never saw a first choice. Choosing an option now counts as a
change unless it was already the selected one, and laws state it.
The Cairo raster behind the desktop and libdraw hosts sized fonts by their
em, reported the font size as the line height, and put the baseline at the
bottom of that line, so every descender fell outside the line box and was
clipped. It also estimated text width as 0.6 of the font size per byte,
which misplaced wrapping and centering, most of all for non-ASCII text.
Text is now sized so its ascent and descent fill the font-sized line box
with the baseline at the ascent, as on the raylib and canvas hosts, and
widths come from Cairo's text extents.
The desktop project test checks that a descender stays inside the line
box, and the desktop size and window tests resolve Ziran in the
org-grouped layout.
EndFrameRetained dropped paint that matched the previous frame, trusting
the host to present that frame again. A host that also draws on its own,
such as Inbe's animated breathing circles, repaints when its own drawing
changes, and then every widget vanished from the frame. The caller now
says whether it will reuse the previous frame; when it will not, the
paint is emitted even if unchanged.
TextProps.align and vertical_align are TextAlign values, but the public
surface imported text_align without re-exporting it, so an application
could not name TextAlignCenter. The public widget check now sets both
alignments and the wrap mode through the Widgets import.
Hosts now agree on key codes, so Kryon names them (KeyEnter, KeyBackspace,
KeyLeft, ...) next to the modifier bits. TypedTextTake collects a frame's
typed codepoints as UTF-8, and TextFieldInputFor turns a key, modifiers, and
typed text into a focused TextField's input, which apps each wrote by hand.
The terminal host passed raw bytes (Backspace 127, Enter 13, lowercase
letters) and discarded every escape sequence, so the arrows, Home, End,
Delete, and Escape never reached an app. TerminalKey now reports the codes
the other hosts use, Control+letter reports the letter with the Control
modifier, CSI and SS3 sequences name the arrows and editing keys with
xterm's modifiers, and Escape alone arrives after a 25 ms pause.
The SDL desktop host passed raw SDL keycodes (Backspace 8, Left
0x40000050, lowercase letters), while the canvas, raylib, and libdraw hosts
send raylib codes (Backspace 259, Left 263, uppercase letters). An app that
read keys on one host misread them on another; Pass's desktop build never saw
Backspace, the arrows, or Tab. DesktopKey now translates SDL keycodes the way
LibdrawKey translates Plan 9 runes, and keys with no shared code are dropped.
Apps written against the SDL codes (workbook, social, dashboard) need the
shared codes. The desktop project test resolves Ziran in the org-grouped
layout like the libdraw test does.
The library rule also generated C++ and Go and ran go test, so any app or
packaging build that only links the C library needed Go installed; Inbe's
snap build failed with "go: not found". backends-check now holds the C++
compile and the Go test, and make all still runs it.
The libdraw tests pointed at ../../ziranlang/ziran, which exists only in
the local layout, so Kryon CI (which checks Ziran out beside Kryon)
failed. They and the Makefile now use ../ziran when it exists and fall
back to ../../ziranlang/ziran.
A slider's drag starts on a press over it, ends on capture, disable, or
release, never moves a disabled slider, and its keys stay in range with
Home, End, and Shift steps of ten. A paned view's divider drag starts
only from a fresh press on an enabled split and ends on capture,
release, or disable. Each module has a mutation its laws reject.
Layout's clamp keeps values in range and ends an inverted range at its
maximum, as the old model stated. Releasing a scroll bar thumb, and
arming, starting, and bounding a touch scroll of content, are now laws
on the scroll decision functions, each with a mutation they reject.
Reordering, segment wrapping, spinbox clamping, assistive selection,
button activation and menu toggling, collapsible sections and tree rows
(pointer, keyboard, close, and open state), selectable items, toggles,
and swipe lifecycles now carry the laws the old Bend models stated, as
Ziran laws on the decision functions, each with a mutation they reject.
An inverted spinbox range leaves the value alone, as the Ziran widget
does; the old model had the minimum win.
The widget laws that were written as Bend reference models on the old
.kry runtime are now Ziran laws on Kryon's own decision functions:
checkbox values, focus activation and Tab direction, keyboard drags,
drag and drop, dropdown opening, radio activation, input and link
pointer handling, the inspector's release, multi-select rows, menus
(Escape, accelerators, context open and close, wrapping, submenus,
outside release), modal and overlay dismissal, and popup ownership.
`ziran check` proves them over every listed input, and each module has
a mutation the laws must reject.
Starting a temporary text edit compares floats, which laws cannot yet
pass through calls, so the input test now covers each of its cases.
The canvas host had no system clipboard. It now reads and writes through the
browser's permission-controlled Clipboard API, falling back to the copy
command during a click or touch, and waits for the browser's answer so a
refused write is reported to the app instead of looking like a success.
OpenDesktopSized opens the SDL/Cairo window at a given size, DesktopViewport
reports the drawing area, and ResizeDesktop asks for a new size that the
next BeginDesktopFrame applies, so a frame never draws into a surface that
changed under it. A failed resize keeps the old size. The desktop runner
now draws at DesktopViewport instead of a fixed 960x600. Apps use this for
compact windows, such as a small mode that grows into the full app.
Style sheets give a segment offset-x as its label padding, which sizes
the segment. The button that draws the segment read the same field as a
content offset, so every segment label sat that far right of center.
Segment faces now drop the offset inside the button, as modal faces do.
KSS imports kryon/system_theme and kryon/theme. With exports named
after their modules, the same imports resolve in a --project build
and in a module-path build that names Kryon with
--module-path kryon=src/ui.
The Android surface overlays raylib's native CORE.Window record. Pruning
unused fields for a single entry point could shrink it and misplace the
size fields. A size assertion keeps its padding, and the test compiles a
pruned entry against raylib's real layout.
PushRoute and ReplaceRoute wrote history as path plus hash, so the first
route write dropped any ?query the page was opened with, such as an app's
embed flag. They now keep location.search, and GetRouteQuery reads it.
IconExpand (127) is the two-corner open-in-full glyph, drawn in the same
style as the navigation icons and placed in the next free ui.png cell so no
existing icon moves. The icon generator now keeps the IconType ids it writes,
instead of dropping them from ui.json.
Style sheet parsing, formatting, the style packs, and their tests now
live in kryonlabs/kss, which depends on Kryon. Kryon keeps the rule
table and style resolution, so an app that builds its rules in code no
longer carries a parser; apps that read .kss text add the KSS package
and import kss/Kss or kss/SystemStyle.
Describing generated C to editors is not specific to Kryon, so it now
lives in `ziran compile-commands`. The project build calls it with the
flags Kryon compiles with and says to update Ziran when the pinned
toolchain is too old to have the command.
A profile's static_archive names a project-relative .a file that Kryon
adds as a build dependency and linker input. It rejects absolute paths,
paths or symlinks that leave the project, non-regular files, and browser
profiles, so reproducible builds never pick up a system library.
Canvas and DOM builds now check and save the app with `ziran ir
--project`, like native builds, so an app's Git dependencies and
package-qualified imports such as Kryon/Widgets work on the web too.
Browser routing is exported as PageRoute for apps that read or push
the page route.
PlotWidget now lives in kryonlabs/plot, TableView and TreeView in
kryonlabs/data-views, and the Ziran, C, and Make tokenizer in
ziranlang/syntax, which no longer depends on Kryon. Apps add them with
`ziran add URL` and import plot/Plot, data_views/TableView, or
syntax/Syntax.
Kryon exports the building blocks those packages draw with (session,
tree, surface, paint_queue, style, style_sheet, widget_kind, and the
rest), so a widget package imports kryon/NAME instead of reaching into
Kryon's source directories. The API guide describes writing one.
The textured fan for rounded images drew nothing inside the raylib
runner, and CI's raylib host test failed. Rounded images now draw as rows
with DrawTexturePro, each mapped to the matching part of the source, so
they still need no scissor and batch with other quads.
The same test exposed that CaptureConfigured read the framebuffer before
the frame's batch was drawn; it only passed while scissor changes flushed
the batch early. The capture now flushes first.
Several sessions push master more often than a run takes, and each push
cancelled the run before it, so master got no finished run at all (two
in a row were cancelled while testing the CI fixes). Runs on master now
each get their own concurrency group; pull requests still replace their
older runs. Move actions/cache and upload-artifact to the releases that
run on Node 24.
A press only reached the node under the pointer if the button was still
down at the end of the frame, so a quick tap during a slow frame (both
events arriving between two frames) was silently dropped. It now presses
the node, and the release in the same frame activates it.
SegmentedControl never painted its own face, so the theme's background
and border for it were ignored and an unselected segment floated with no
edge. A single-row control now fills its background first and draws its
outline over the segments. The material theme makes it a pill with the
outline color and readable labels, as Material 3's segmented buttons.
A rounded image was clipped by drawing one scissored strip per corner
row. Every scissor change flushes the draw batch, so on a phone the Lists
screen spent 80% of each frame there and scrolled at about 4 fps. The
visible rounded region is now one textured triangle fan whose texture
coordinates map the destination onto the source; rotated images keep
the strip path.
CI has failed on every push since 09-27; three causes, none visible on a
developer machine with old build outputs:
- The behavior tests call ziran/build/bin/ziran and link libziran.a, but
`make test` only built the zi2* compilers, so on a fresh runner every
test failed with "ziran: not found". ziran-test now builds the toolchain.
- The raylib host pointed RAYLIB_SOURCE at the root of the raylib package
since the move off the submodule (3e865032); raylib's library and
Makefile live in src/. Local builds kept linking a libraylib.a from the
old submodule, so only a fresh build failed ("package is incomplete").
- make test now includes the Canvas2D and DOM browser tests, and apps
found emcc only under /home/wao. EMCC defaults to $HOME/emsdk, as the
tests already do; CI installs emsdk 6.0.6 there (cached) and runs the
browser tests in the runner's Chrome.
The navigation bar was a floating bordered card with a square indicator.
It is now Material 3's: full width with no border or margin, 80 units
tall, a 64x32 pill behind a 24-unit icon, and the selected label in the
text color. NavigationBarHeight reports the theme's height so an app can
reserve it before drawing.
Styling apps had been adding themselves is now the theme's default:
cards on the surface color with 16-unit corners, unframed images in every
style pack, a title bar on the canvas with tonal action buttons, and a
muted text class. Text is about 12% larger (15/18/20), which reads better
on phones.
Every widget copied the whole 320-rule table at least twice per frame:
ActiveStyleRules() returned it by value, ResolveStyleRules took it by
value, and ApplyStyleRule copied the cascade and the rule for every rule.
On a phone that memcpy was the largest single cost of a frame.
ApplyStyleRules now reads a borrowed view of the rules in place, and
widgets resolve through ResolveInstalledStyleRules. The widget face
functions (Checkbox, Toggle, Radio, Slider, Image, Progress, Separator,
Plot) no longer take a rule table; tests install theirs first. The unused
single-rule ApplyStyleRule/ResolveStyleRule and the FromRules paint
helpers are gone.
CI ran only `make test`, so the desktop, raylib, and libdraw hosts that
the feature matrix calls supported were never checked automatically.
A new job installs SDL, Cairo, Mesa, and the X tools, builds plan9port
once (cached), and runs the three project tests, each on its own private
Xvfb display with DISPLAY, WAYLAND_DISPLAY, and XAUTHORITY removed.
`make sanitize-test` repeats the behavior tests with every C and C++
program they build compiled under AddressSanitizer and
UndefinedBehaviorSanitizer, through $CC/$CXX wrappers; CI runs it in a
parallel job. The main job also fuzzes KSS with the run number as seed,
so each run adds sheets, and keeps a failing sheet as an artifact.
A frame that awaited mid-draw, for example to decode a new image, left
the page showing the cleared canvas for a frame, a blank flash on
navigation. Frames are now drawn into a back canvas and copied to the
page when they end, so the page always shows a complete frame.
The canvas browser test checks that a frame in progress stays off the
page, and records its later failures instead of returning them from main.
Its fake textures lacked PageTextureUpdateRgba and rejected glyph pages.
It now also checks that a glyph outside the atlas is added once to a
page and freed with its font.
build/ had grown to 3 GB in 149 top-level directories, most of them
one-off debug builds (dom-debug3, zi2-isolated, header-check2, termi-*
with their own libcurl, an old Go module cache). BUILD_OUTPUTS names the
directories that targets and tests write; `make clean-scratch` removes any
other entry once nothing has written to it for a day, so a build another
session is running keeps its files. Experiments go in build/scratch/.
The default Xvfb keymap has no é, so `xdotool key eacute` maps it to a
spare keycode and restores the map right after the press. When SDL read
the press after the restore it saw no text, and the desktop test failed
about one run in three. Press again every half second until the window
reports the character; six runs in a row now pass.
src/kss/style_pack_classic.zi embeds styles/kryon/classic.kss so apps can
install the pack without the file. It stays committed: apps import Kryon
as a package without running its Makefile. A Python script wrote it by
hand, and nothing noticed when the two drifted apart.
tools/style_pack_module.zi now writes it (`make style-packs`) with the same
chunks as before; only the header names the new tool. `make
style-pack-check`, part of `make test`, fails while a module differs from
its pack.
kss_parser.zi held 5,400 lines. It now keeps the module's imports, types,
and parser setup, and #loads the rest from src/kss/parser/ in the original
order: lexer, token table, vocabulary, rules, blocks, directives and the
step, CSS values, and selector matching. The module, its API, and every
import stay the same; the generated C, C++, and Go are byte-identical to
the unsplit file. The parts are listed as build dependencies in the
Makefile and mk/ziran-project.mk so apps rebuild when one changes.
tests/kss_fuzz.zi feeds generated and damaged sheets to the typed parser,
the declarative parser, the rule table, and the formatter, built with
AddressSanitizer and UndefinedBehaviorSanitizer (`make fuzz-kss`, and a
seed-1 run in `make test`). It checks parser state after every step, that
parses end, that errors carry a diagnostic, and that formatting only moves
white space, keeps the rules, tokens, declarations, and variant labels, and
is stable. A failing sheet stays in build/kss-fuzz; `sh tests/kss_fuzz.sh
shrink FILE` cuts it down while it keeps failing the same way. Sheets that
once failed live in tests/kss_corpus and run first; *.ok.kss must parse.
What it found, now fixed:
- The formatter dropped @import lines: import directives recorded no span.
- It dropped the @media/@font-face keyword and closing brace of foreign
and group blocks, and wrote text it could not read back.
- It duplicated comments, one more copy per run: the gap scan walked the
constructs it was appending to.
- It split quoted labels and import targets on one-line reflow and read
comment openers inside strings; it now scans quotes and comments the way
the parser does.
- A brace with nothing before it gained a stray space, so formatting was
not stable; an unclosed comment at the end lost its last byte.
- A valid sheet with more than 32 top-level blocks failed to parse, and
blocks inside imports used up the table. Block spans serve the formatter
only: a full table now marks an overflow the formatter reports, and spans
are recorded for the top-level source only. KssParser keeps its size
(42160 bytes); it travels by value, and more overflows the Android render
thread's stack.
- Quoted text and import targets end at their line, as CSS strings do, and
import targets reject white space, quotes, braces, and semicolons, so
re-indenting cannot change what they name.
Reached through a symbolic link (~/Projects -> /mnt/storage/Projects),
ripgrep could not anchor the script's own exclusion to the absolute search
path, found 'vendor/raylib' in the script itself, and failed every `make`.
Search from the repository with relative paths instead.
`make laws` proves each law over its whole domain with `ziran check`,
and a mutation test confirms deliberately broken implementations are
rejected, so the laws are not vacuous. `make check` runs both.
The laws found that ScalePixels truncated negative sizes toward zero,
moving every negative offset a pixel; it now rounds half away from zero.
Apps cleared the whole surface to their canvas color, so the status and
navigation bar strips outside the safe viewport showed the app's
background behind light system icons. ClearAndroidFrame clears those
strips black and fills only the viewport with the canvas color.
Only text and images honored a node's clip, so cards in a scroll view
drew their backgrounds and borders over the header and navigation bar.
Fills, outlines, lines, and gradients now draw only their visible part:
straight spans as rectangles and the rows of a cut corner one by one,
with no backend clip.
A Text line that starts inside its box is drawn whole, so a box a little
shorter than the line no longer cuts off the bottoms of its glyphs; lines
that start below the box are still clipped away.
On a phone, Habits spent a third of each frame in GL: every clipped label
and image set a scissor, which reads GL state and flushes the draw batch,
and every rounded corner was built from a fixed dozen segments on the CPU.
Text wholly inside its clip and an unrotated image inside its strip now
draw without a scissor, and a corner takes only the segments needed to
stay within half a pixel of the arc at its on-screen radius.
The canvas font atlas only held U+0020 to U+00FF, so arrows, ellipses,
Greek, Cyrillic, and CJK text all drew as ?. Glyphs missing from the
atlas are now rasterised on first use into extra atlas pages, as the
native host adds them to its font.
Updating part of a texture now drops only that texture's tinted copies.
The canvas browser test records failures after main suspends, which
exposed that it never unloaded the default font it used.
The host samples the pointer, wheel, and clock once per frame with
BeginScrollFrame (moved here from Inbe as scroll_device.zi); every Scroll
then observes that device on its own, so apps no longer pass an
observation into each ScrollProps.
Dragging content scrolls it on touch and mouse. The drag waits for a
threshold, and once it moves it cancels the press on the widget beneath.
A flicked drag keeps coasting and slows down until it stops, reaches
either end, or is touched. Wheel notches glide to their target over
about 150 ms instead of jumping, and further notches extend the glide.
kryon_android_raylib builds raylib's Android backend with the module set
Kryon uses; kryon_android_app adds native_app_glue, size flags, 16 KB page
alignment, the fopen wrap raylib needs, and the system libraries.
Glyph bitmaps put the baseline at the browser's font ascent plus padding
but reported no vertical offset, so text sat below its raylib-style line
box and widget clips cut it off. Firefox reports a larger ascent, so
small labels vanished entirely. Fonts are now drawn at the CSS size whose
ascent plus descent equals the requested size, and each glyph's offset
places its baseline at that ascent.
Canvas text and image clips passed layout rectangles to a screen-space
scissor, so under a render scale such as 1.07 every clip shrank toward
the origin. They now go through BeginRasterClip like the native host.
The canvas browser test checks both, and now fails when a check after
font loading fails; before, Asyncify dropped main's exit code.
The old JS runtime provided these; they now live in Ziran on the web bridge and
read the page location on every call. A headless Chromium project test covers
push, replace, hash and version.
Apps ported between the raylib and canvas backends call these by name. The
canvas trace level filters TraceLog once set and shows everything by default.
The menu state and drawing move to text_context_menu, which both widgets use:
right-click opens Cut, Copy, Paste, and Select all on the system clipboard, and
the keyboard's Cut, Copy, and Paste reach it.
- SecondaryPointerFrame carries the right button beside PointerFrame; the
desktop, raylib, and canvas hosts report it.
- SystemClipboard reads and writes the host clipboard (SDL and raylib; the
other hosts report none).
- ContextMenu is an overlay list of commands; TreeDefer lets a widget draw
above the whole page at the end of the frame.
- TextField opens Cut, Copy, Paste, and Select all on a right click and
Ctrl+C, X, and V reach the system clipboard.
- A press and release inside one poll now counts as a press, so taps and fast
clicks reach widgets.
SystemTheme parses a GTK theme's @define-color palette; SystemThemeLinux finds
the configured theme (Xfce xfconf, GTK settings.ini, GTK_THEME); SystemStyle
installs the embedded classic pack with the palette's colors. This replaces the
system theme the legacy C runtime had.
Icons are drawn from a Shape (path data in a 24 x 24 box) as anti-aliased
queued rectangles, so every host draws them at any size, tinted with the text
color, with no PNG atlas.
Text was split only at spaces, so a Japanese or Chinese sentence was one
word: it stayed on a single line and ran past the widget's edge. A line may
now break between characters when either side is kana, an ideograph, or a
fullwidth form, except before closing punctuation, the prolonged sound
mark, or a small kana, and after an opening bracket. Spaced scripts and
long Latin words behave as before.
The project build described the generated C to editors with
tools/write-compile-commands.py, so building any Kryon app needed
Python. The kryon project tool, which is Ziran, now does it as
`kryon compile-commands INCLUDE COMPILER GENERATED OUTPUT`, and the
makefile calls it. It writes the same bytes as the script did for a
real project, an empty directory, a compiler with arguments, and a path
that needs JSON escaping. The desktop project test checks the file's
entries and flags.
The script's deletion landed in the previous commit; this one carries
the tool, the makefile change, and the test.
Applications place controls at fixed positions, so a button reserved at
72 pixels clipped a longer label in another language. ButtonMeasure returns
the bounds a button takes for its props: a given width or height is kept,
and a zero one comes from the label, icon, and style, the same measurement
Button uses.
The runner now feeds the wheel and modifiers through zoom each frame, keeps
the Ctrl wheel and the zoom shortcut keys from the application, and draws
at the resulting factor: the modelview is scaled after BeginDrawing so the
clip code, which reads that matrix to place scissors, stays correct; the
viewport and pointer are reported in scaled space so layout reflows to the
smaller viewport; and fonts are baked at the size they reach the screen.
KRYON_ZOOM sets the starting factor. The Zoom and DPI modules are exported
for applications with their own frame loop.
The raylib project test checks a capture at 200% and a real Ctrl plus wheel
on a private display.
The canvas window, drawing, textures, fonts, input, files, clipboard, drop and gamepad hosts are Zi modules (page_*.zi) calling the browser through std/web.zi. Kryon links only Ziran's generic ziran_web.js and a small C varargs shim. The JS budget test becomes a zero-JS boundary test.
An application that stores its scale sets the factor every frame. That
reset the carried part of a notch even when the value was the same, so a
touchpad's small movements never reached a step. Setting a factor changes
the carry only when the factor changes.
zoom.zi decides in Ziran what a browser's page zoom decides: Ctrl with
the wheel steps one factor for the session, Ctrl with plus, minus, or zero
steps or resets it, and the wheel is reported as consumed so lists do not
also scroll. The ZoomProps prop defaults to automatic mode, which zooms on
desktop windows and leaves browsers and touch screens alone; on, off, the
range, and the step are configurable. Small touchpad movements add up to a
step, and the factor always lands on a whole step so an application that
stores a scale in tenths sees exact values.
TextFieldProps and TextFieldResult carry a CompositionState, but the
Widgets import did not export that type, so an application could hold a
text field's state only by importing an internal module. Widgets now
re-exports it, and the public surface check names it.
KeyboardTake reports one key press, but a shortcut such as Ctrl+S is a
key read together with the modifiers that were down. Hosts now submit
the held Shift, Control, and Alt keys with KeyboardModifiersSend before
each frame, and an application reads them with KeyboardModifiers. The
desktop host takes them from the key event itself so a modifier
released before the poll ends still counts; the raylib host reads its
key state. The tree input test covers the primitive on every target,
and the desktop project test presses Ctrl+S under Xvfb.
The audio JavaScript tracked buffers and their reference counts, sound
voices, pause positions, music position and loop state, streams and
their scheduling, callbacks, processors, and every clamp. All of that
now lives in canvas_audio_engine.zi, and the page creates and connects
nodes for integer handles that module picks (401 fewer lines).
A native test runs the state machines against a fake WebAudio host with
a controllable clock: clamps, refcounts, voice overflow (now bounded at
16, oldest cut off), pause offsets at the playback rate, music position
and seek clamping, non-looping end, stream scheduling and the two-block
limit, timers, processor order, and close.
Which element, role, level, and attributes each semantic node gets, the
native disabled state of buttons, and the document title were decided in
the page's JavaScript despite its header saying otherwise. Zi now
computes them (DomSpecFor) and hands the page explicit values.
A native test covers every semantic kind, the widget-kind fallbacks,
heading clamping, links, images, and the flag bits. One edge changes:
a page node with no label no longer takes its title from its
descendants' text.
The Canvas host's JavaScript held the DOM key table, press/repeat and
release tracking, pointer scaling, wheel units, touch-to-mouse
synthesis, focus handling, clipboard, and which events to cancel. It
now forwards each raw DOM event to a Zi handler (canvas_events.zi) that
owns all that state and answers with flags for what the page does next.
A native behavior test drives the handler through every one of those
rules without a browser, and the JS budget test now bans the key table
from returning. 161 lines of JavaScript are gone.
The Canvas and DOM hosts are moving their policy into Ziran. This test
records each JS file's line and entry-point budget, so it can only
shrink, and lists policy identifiers that must not reappear there.
A duplicate explicit key rejects the whole frame, and hosts only saw the
status. The tree now keeps the offending key and widget kind until the
next frame starts, readable through TreeFrameErrorKey and
TreeFrameErrorKind.
The thumb centred on the track ends, so at the minimum or maximum half
of it hung outside the control and over neighbouring content. The track
now leaves half a thumb at each end; pointer mapping follows the track.
Labels paint after the widget call returns, so text formatted into a
caller's local buffer was gone by paint time and labels such as version
numbers, percentages, and formatted options drew empty. The paint queue
now copies each label into per-session frame text and paints from it.
Sliders and radios passed 0.5 as a pixel corner radius, so their tracks,
thumbs, and marks drew as squares. PillRadius gives the half-side radius
every pill and circle paint now uses. A single-row segmented control
split its content width instead of its bounds, clipping longer labels;
it now fills bounds wider than its content.
Text snapped to 14, 16, or 32 pixel atlases and was scaled to its real
size, so 15-36 pixel text was blurred and picked up edge pixels from
neighbouring glyphs. Each requested size now gets its own atlas, cached
per typeface and rebaked when new glyphs arrive.
Toggle passed 0.5 as a pixel corner radius, so switch tracks and thumbs
drew as squares. Tracks and thumbs are now pills; labeled toggles follow
the theme radius up to half their height. A checked thumb used the
accent text ink, which is near-black on pale accents; it now uses the
thumb ink.
Kryon declares its [tool.Kryon] settings under [options] in ziran.toml.
Ziran checks and merges them, including ziran.local.toml, and the kryon
tool reads the result, so Kryon no longer parses TOML itself.
`ziran install` builds the [tool.Kryon.install] profile, replaces
PREFIX/bin/BIN in one step so a running copy is never touched, and
writes the icon, menu entry, and optional autostart entry.
SDL reports both a closed last window and SIGTERM or logout as SDL_QUIT, so
an app hiding to its tray would also ignore the session ending. While
interception is on, the desktop host now turns off SDL's quit-on-last-
window-close, treats the window's close event as the close request, and
always quits on SDL_QUIT.
Checkbox, Toggle, Selectable, Spinbox, Slider, and DiscreteSlider returned
result types declared in internal modules, and Column, Row, Stack, Group,
Screen, and Grid took props that Widgets did not expose, so a package app
could not name them. Move those types into each widget's props module and
export layout_props and grid_props from Widgets.
Project builds now make only the Ziran driver, zi2zir, and zi2c instead of
every backend, so an unrelated backend cannot stop an app build.
The new Window module lets an app keep working in the background: it can
hide and show its window, ask the host to report the close button instead
of quitting, and quit when it decides. The SDL/Cairo desktop host supports
all of it and keeps calling Frame about ten times a second while hidden,
without presenting. raylib hides and shows but cannot cancel a close;
terminal, libdraw, and browser hosts accept the calls and report what they
cannot do.
Window and Tray are now package exports, so apps built with ziran tool
Kryon can import them.
`tray` shows a notification-area icon with a nested menu and reports the
chosen action to the app, which decides what it means. On Linux and BSD it
runs GTK on its own thread, loaded with dlopen only when a tray opens: a
StatusNotifierItem through libayatana-appindicator (or libappindicator)
when installed, otherwise a GTK status icon for XEmbed trays
(KRYON_TRAY=status-icon forces it). Windows uses Shell_NotifyIcon on a
private message window.
TrayVisible is true only once a host shows the icon (an XEmbed tray embeds
it or a StatusNotifierWatcher accepts it), so apps hide their window to the
tray only when the user can bring it back.
This is Inbe's tray moved into Kryon so ATR and other apps can share it.
An unseeded typeface baked only raylib's 95 ASCII glyphs, so accented locale
text and punctuation such as › and — drew as '?'. Start from Latin, Greek,
Cyrillic, punctuation, currency, and arrows, keep the font source, and rebake
once when measured or drawn text needs a glyph that is not in the atlas yet.
Modal action and close faces carry dialog layout sizes in offset-x and
offset-y. Button treated them as content offsets, so style packs pushed every
modal button label 88px right and 150px down, outside the button's clip.
Zero them for Modal-styled buttons and drop the unused helper that did this
for the removed handwritten runtime.
PaintVerticalGradient queues a top-to-bottom fade with the frame's other
paint, so it can cover an Image submitted earlier in the same frame. Backends
still rasterize only flat rectangles; the gradient is emitted as one-pixel
rows.
Kryon projects can select the canvas or dom backend to build a single-file
browser app through Emscripten. Images and links carry semantic detail so the
DOM backend can expose real image sources and link targets.
Foreign bindings stay module-local, so downstream modules could not see
the token resolver declared directly. Wrap the host binding in a plain
procedure, which crosses module boundaries like every other drawing
helper.
Translated app UI reads theme tokens by name through the runtime
style-pack resolver. The resolver is a host capability like the raster
primitives, so declare it beside the color helpers with the same
host_api binding convention.
vendor/raylib enters as an HTTPS submodule and mk/ziran-project.mk builds
it statically for PLATFORM_DESKTOP_SDL with audio enabled, so kryon
projects can choose backend raylib alongside terminal and desktop.
src/backend/raylib_runtime.zi implements the host raster contract on a
real GPU window (texture cache, scissor, font loading, screenshots) and
raylib_run.zi is its app entry loop. raylib_game.zi adds the plain game
surface applications import directly: window control, keyboard/mouse/
touch input, textures and render targets, shape and text drawing,
camera2D, blend and scissor modes, the audio device, sounds and music,
raylib timing and random values, and libm math - all with raylib's own
names over Ziran types that match the C ABI. Headless builds link C
stubs under the same names instead of libraylib.
The Android launch activity, secure store, and text input bridge called
JNI natives whose C implementations were deleted with the legacy core;
application launch activities belong in their applications. Kryon
implementation source is now 100% Ziran and the source inventory rejects
any new handwritten implementation file. The header check now searches
from the repository root so its test-host exclusion actually matches.
Inserting it second shifted the positional mapping of every positional
Image literal in existing sources (k2go syntax test caught hero.png's
alt text landing in the texture slot). A trailing field preserves the
mapping; runtime-texture callers use named fields.
Two app-facing gaps found porting krait, both filled in the established
props idiom:
- BeginOffscreenFrame(width, height, forced_scale) + UpdateDPIOffscreen: size
the layout for an explicit render target with a forced scale (render-to-
texture previews), without BeginDrawing — the caller is already inside
BeginTextureMode and pairs it with RestoreFrameState.
- ImageProps.texture: Image(ImageProps) now honors a runtime Texture2D when
set instead of loading asset_path, keeping Image(ImageProps) the only image
surface (the names law blocks a separate ImageTexture entry point).
Gates: generated-runtime-parity-test, fast-test, kryon-boundary-check,
public-api-snapshot-check (refreshed), public-api-names-check,
image-policy-test.
Custom-content modal frames (palette-style overlays with their own content)
had no app-reachable surface: RenderModalFrame lived in ui_internal.h while
apps built against the tracked headers. modal_props now declares PanelFrame as
a one-line #type record and RenderModalFrame as an extern; ui_internal.h drops
its private struct in favor of the tracked declaration. Krait's IDE overlays
are the consumer.
Gates: generated-runtime-parity-test, fast-test, kryon-boundary-check,
modal-policy-test, public-api-snapshot-check (refreshed), all syntax tests,
go-runtime-test.
The shared pointer frame references GetTouchPosition/GetTouchPointCount, which
every backend except libdraw provided — so any libdraw link (rill is the live
consumer) failed on the two undefined symbols. libdraw surfaces have no touch
input; satisfy the queries with empty results.
Gates: generated-runtime-parity-test, fast-test, kryon-boundary-check, and a
full KRYON_BACKEND=libdraw libkryon.a build pass.
The missing piece for migrating legacy theme getters: apps register named
color tokens through RegisterStylePackVariant, but nothing could read one back
outside the widget cascade. style_pack_source.kry now retains each pack's
token table (a flat 32x64 global; .kry has no nested fixed arrays) and exposes
StyleTokenColor(name) and StyleTokenColorOr(name, fallback) — declared in
style_pack_props — which read the active pack's table and unpack the u32
in-raylib byte order locally (no GetColor dependency, so the style suites link
without a backend).
Downstream, GetThemeBackground()/GetThemeText() calls become
StyleTokenColor("canvas")/StyleTokenColor("text") against the token names the
app already registers — the mechanical path B-001's deletion needs.
Two debugging notes recorded for the plan: an apostrophe in a top-level .kry
comment silently truncates parsing (the tokenizer swallows the rest of the
file as an unterminated char literal — keep prose out of top-level comments),
and nested fixed arrays are a hard parse error.
Gates: generated-runtime-parity-test, fast-test, style-pack-source/registry/
picker/release-startup suites, kss-host-ledger-check, kryon-boundary-check,
refreshed snapshots, plus a functional register/activate/read/fallback test.
include/ui_window.h is deleted. runtime/window_props.kry declares NativeWindow
as a one-line opaque "#type" (struct NativeWindow NativeWindow;) — an opaque
forward declaration is just C text, no emitter feature needed — and the eleven
window lifecycle/input calls as "#extern #export" declarations. The window
host, policy host, kryon.h, and the window test include the props header
directly.
Gates: generated-runtime-parity-test, fast-test, k2c/k2cpp/k2go-syntax-test,
go-runtime-test, examples-syntax-test, kryon-boundary-check, the ui_window_test
binary, and the refreshed public-API snapshot pass.
2026-09-21 10:01:15 -03:00
3778 changed files with 255988 additions and 389718 deletions
"request":"One original friendly full-body dragon mascot for the Kryon UI toolkit, in the Ziran capybara's flat warm illustration feel, followed by a pastel-only color revision that preserves the accepted character.",
"pastel_follow_up_request":"okay but the colors should be more pastel — for the mascot",
"generation_mode":"built-in image_gen",
"generation_calls_planned":1,
"conditional_retry_allowed":1,
"generation_calls_completed":3,
"attempt_count":3,
"pastel_edit_calls_planned":1,
"pastel_edit_calls_completed":1,
"retry_reason":"The first attempt had extra body shading and tighter margins, a clear style/composition mismatch; the one permitted retry fixed the flat-ink direction.",
"proposals":[
{
"id":"01-dragon-v1",
"version":"v1",
"attempt_count":2,
"animal":"Dragon",
"direction":"Rounded approachable full-body dragon in three-quarter view, facing right, with a calm warm personality and strong small-icon silhouette.",
"prompt":"Use case: logo-brand\nAsset type: final original mascot bitmap for Kryon, a UI toolkit and Ziran sister project; exactly one finished character.\nPrimary request: Create one entirely original friendly cartoon dragon mascot for Kryon. KDE inspiration is limited only to the broad idea of a rounded, approachable open-source cartoon dragon body and shape. This must not copy or trace Konqi and must not reuse Konqi's exact face, anatomy, pose, or proportions.\nScene/backdrop: None. A genuinely transparent square canvas with no background pixels, ground, shadow, border, or decoration.\nSubject: One full-body dragon in three-quarter view, facing right, standing in a relaxed welcoming pose. Big friendly head, short rounded snout, small rounded horns, small wings, a soft row of rounded back spines, four simple grounded feet without claws, and one clear tapering tail. Calm warm expression, small gentle eyes rendered only with earth-brown marks, closed mouth, no teeth. Nothing in its hands.\nStyle/medium: Confident hand-drawn flat illustration in the same visual family as Ziran's capybara mascot: bold deep earth-brown outline of consistent apparent weight, large quiet solid color areas, minimal interior marks, slight purposeful hand-drawn irregularity, calm warm character, strong sticker-like silhouette readable as a tiny website icon. Absolutely flat ink fills: no lighting, highlights, shadows, secondary shades, gray, cream, white fill, texture, or tonal modeling.\nComposition/framing: Center the single complete dragon on a 1:1 square canvas. The entire silhouette should occupy about 72–76% of the canvas width and height, leaving a clean 12–15% transparent border on every side. Every horn, wing, spine, foot, and tail is wholly visible and comfortably clear of the edge. Three-quarter view faces right.\nColor palette: Exactly four visual ink colors and no others except edge antialiasing between them and transparency: jade green #63B190 for the entire body and wings; exactly one continuous lake-blue underside/belly plane #77B7EA; deep earth-brown #502511 for every outline, eye, nostril, and minimal interior mark; one restrained muted light-orange #A48B62 used only on the small horn tips. Do not create light and dark variants of any color. Do not use orange on wings or elsewhere.\nText: NONE.\nConstraints: One original approachable rounded dragon; one character only; genuine alpha transparency; strong readable silhouette; generous clear margins; four flat source-family inks only; exactly one lake-blue belly plane; orange limited to horn tips; eyes use brown with no white eye fill.\nAvoid: Konqi likeness, KDE logo, gear, fire, smoke, teeth, aggressive claws, K monogram, letter-shaped body, props, clothing, scenery, borders, frames, solid or patterned background, gradients, glow, glossy 3D, textures, shading, highlights, drop shadows, extra characters, extra limbs, cropped anatomy. Absolutely no text, letters, numbers, labels, signatures, logos, or watermark anywhere.",
"direction":"Pastel-only color revision of the accepted v1 dragon, preserving the same friendly character, pose, proportions, framing, linework, expression, wings, spines, and transparent background.",
"prompt":"Use case: precise-object-edit\nAsset type: pastel color revision of the accepted Kryon dragon mascot bitmap.\nInput images: Image 1 is the sole edit target, the accepted v1 Kryon dragon mascot.\nPrimary request: Change ONLY the four flat ink colors of Image 1 to a softer pastel palette. Do not redraw, reinterpret, restyle, simplify, or add anything.\nColor palette: body pastel mint/jade approximately #A9DCC5; the single existing belly/underside plane pastel sky blue approximately #BCDDF6; the existing horn-tip accents pastel peach approximately #F5C7A1; all existing outline, eye, nostril, and interior marks deep earth-brown/warm cocoa approximately #6B4434. Use at most these four flat visual inks plus edge antialiasing and transparency.\nTransparency: Preserve the genuinely transparent background and all current alpha edges. No background pixels, ground, or shadow.\nInvariants: Preserve the exact same original character, pose, anatomy, proportions, framing, silhouette, linework geometry and apparent weight, expression, gaze, wings, rounded back spines, horns, feet, tail, belly-plane shape, detail placement, canvas dimensions, and transparent margins. Change only colors. Keep every existing element in the exact same position and size. No added or removed details.\nAvoid: gradients, extra shades, texture, highlights, shadows, glow, glossy rendering, new marks, altered outlines, altered anatomy, text, letters, numbers, logos, signatures, or watermark. Do not introduce a Konqi likeness, KDE logo, gear, props, clothing, scenery, border, fire, teeth, or claws.",
"notes":"The same accepted character, pose, anatomy, expression, linework design, and framing are preserved. Built-in image editing re-antialiased some edge pixels: the alpha>128 silhouette IoU is 99.53710%, ink-region agreement is 99.69063%, and the content bounding box moved by at most two pixels; v2 is therefore not claimed to be pixel-identical to v1."
}
}
],
"validation":{
"local_tests":"passed",
"tests":[
"The retained pastel mascot is a decodable 1254x1254 8-bit RGBA PNG with alpha extrema [0, 255].",
"The retained pastel mascot SHA-256 is 9537921d73713caccd9c991b4998224207f5ad21a079dcebc2f57cfc111daae4 and matches its proposal record.",
"Visible content above alpha 1 has bounding box [107, 64, 1127, 1197], wholly inside the canvas with transparent clearance on every side.",
"OCR returned no text; visual review found no text, letters, numbers, labels, signatures, or watermark.",
"Visual and palette review confirmed the same accepted original dragon, no Konqi copy, the Ziran flat warm style, and the requested pastel mint, sky-blue, peach, and warm-cocoa direction."
],
"scope":"Local validation of the sole retained asset assets/brand/mascot-dragon.png and assets/brand/prompts.json.",
"notes":"The earlier darker bitmap was removed at the owner's request; its prompt and digest remain as provenance only. The retained pastel mascot used one built-in image_gen edit call and its generated binary was copied without retouching."
Loaded 100 of 3778 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.