Expose the native widget surface through ordinary typed TSX components and enforce application composition at generic export and entry boundaries. Migrate maintained screens, scaffolds, gallery publication and editor transport through the common checked IR path. Preserve native logic, retained component state, input and platform hosts; remove the pixmap application route.
Local validation: complete make push-check passed with published Ziran dc3ecf0a, including docs, public source/saved surface, private-display desktop input, native host links and Canvas input parity. Fresh CLI/player/desktop library installed and byte-verified. The full migration matrix records remaining owning suites, published consumer pins, platform runs and Alpha benchmarks; this is a source milestone, not completion of the full campaign.
Twenty-five Python test fixtures wrote manifests that followed GitHub
Ziran master and overrode ziran with the live checkout, so ziran lock
refused Kryon's checked package metadata (cursor-api-test stopped the
full suite this way). tests/toolchain.py now owns one fixture identity:
the exact Gitea Ziran the starter templates pin and this checkout's
Kryon revision. pinned() rewrites a fixture manifest's [toolchain] and
[dependencies.kryon] onto it, kryon_only() keeps a local toolchain
override out of ziran.local.toml, and kryon_test_project uses both
(package_overrides stays for packages under test). cursor-api-test and
desktop-codec-artifact-test pass with them.
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).
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.
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.
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.
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.
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.