Commit Graph
267 Commits
Author SHA1 Message Date
waozi 7e2ebe16ea Refresh native TSX examples, starters and website gallery 2026-11-29 10:17:53 -03:00
waozi de391af5e5 Create native build fingerprints in an owned directory 2026-11-29 05:33:04 -03:00
waozi 22a3120fd3 Run shared project build helpers in native Ziran 2026-11-29 04:55:51 -03:00
waozi 238143dddb Resolve the TSX browser compiler from the locked package graph
Use the gallery project resolver for Kryon as well as optional packages so browser type checking, mounted declarations and native previews use the same selected sources. Refresh the ordinary gallery lock and browser compiler output for the published providers.

Local validation: clean normal dependency resolution; fresh site and browser compiler builds; portable formatting; full browser routes, all 103 maintained TSX sources/previews, source editing and authored diagnostics, mobile layout, disabled controls, reduced motion and contrast. The original ignored gallery local configuration was restored byte for byte.

The current starter profile/runtime and pre-push gates are running separately. The full breaking migration remains Unreleased and incomplete.
2026-11-28 16:14:31 -03:00
waozi c11378900d Publish runnable TSX website guide and verify all examples 2026-11-28 13:47:15 -03:00
waozi 4ea3a668f9 Complete TSX website examples and checked preview options 2026-11-28 08:51:02 -03:00
waozi 214504012c Complete the TSX website with full clipboard capacity 2026-11-28 07:23:07 -03:00
waozi 0b61ce4916 Fix browser gallery plain imports with mirrored package sources
The wasm compiler probes plain imports from the importing file's own directory before the search mounts, so a package file beside a directory module loaded <dir>/module.zi under the directory scope while the import rewrote to <package>__<Name>; linking then failed (scene 58 LineChart: unresolved plot_source__PlotWidget). Mirror every non-Kryon dependency into build/catalog/mirrors/<dep> with a stub <Dir>.zi beside each directory module and embed that tree at /packages/<dep>: the first probe now binds the same identity the plain import expects, matching the native package map. compiler_paths keeps the dedicated dir-scope mounts and cross-root _plain stubs the stubs resolve through.
2026-11-28 04:46:14 -03:00
waozi 3adfe8a967 Version dragon favicons across Kryon website routes 2026-11-28 01:04:47 -03:00
waozi f4bda47333 Preserve module paths and release hosted input borrows 2026-11-27 17:33:38 -03:00
waozi e2b0fbd891 Migrate Kryon UI composition to typed native TSX
Expose the native widget surface through ordinary typed TSX components and enforce application composition at generic export and entry boundaries. Migrate maintained screens, scaffolds, gallery publication and editor transport through the common checked IR path. Preserve native logic, retained component state, input and platform hosts; remove the pixmap application route.

Local validation: complete make push-check passed with published Ziran dc3ecf0a, including docs, public source/saved surface, private-display desktop input, native host links and Canvas input parity. Fresh CLI/player/desktop library installed and byte-verified. The full migration matrix records remaining owning suites, published consumer pins, platform runs and Alpha benchmarks; this is a source milestone, not completion of the full campaign.
2026-11-27 14:24:19 -03:00
waozi 3fc3349612 Bind Android program entries through the public import 2026-11-26 21:10:09 -03:00
waozi e8b42fd4cb Finish flex layout, structural selectors and radial gradients end to end
Style: finalize structural sibling facts (:last-child family) at parent closure so late siblings match in the same frame, parse and match +/~ combinators from submitted siblings, and document the exact tree-context support. Flex: measured page/row/column placement with basis, grow, gaps and padding now sizes the gallery shell (header, scene row, controls bands) instead of manual rectangles. Paint: radial gradients reach every render path (desktop, pixmap, terminal, web, zx). Gallery: the catalog registry imports kryon/app (kryon/app_types is package-internal), fixing the widget-catalog project build broken by the entry-point removal; the desktop shell test follows the shared example build path and locates interactive controls by tree label.
2026-11-26 19:58:04 -03:00
waozi dc4ac53c46 Host Three.js-style staged pages in an optional WebKit island
The zx player gains a WebView host module (WebKitGTK 4.1 on Linux): a
staged page runs in an owned python island child, maps its window into
the player, and answers bounds, seek, play, pause, stop and tick
commands over a versioned bridge; closing the player reaps the child.
Repin the toolchain and starter templates to the Ziran commit that
lets the direct backend lower expression-less UNUSED statements, and
stage the island script and assets beside the player.
2026-11-26 09:54:51 -03:00
waozi 6c3aaf4668 Keep text layout independent and install Windows native hosts 2026-11-26 01:18:56 -03:00
waozi ad43e92a58 Fix plain program entry bridges for native builds 2026-11-25 19:18:09 -03:00
waozi 09664f076d Remove the program-export program entry; main is the only entry
main is the only program entry. Frame stays an ordinary function that apps pass to App.Run; the frame-entry export mechanism (frame_entry, ProjectFrame binds, KRYON_FRAME_ENTRY, *_run.zi hosts) is gone. The pixmap, dom, terminal, zx and android frame loops are now frames_*.zi modules that App.Run selects. Consumer tests and fixtures build their own shot programs through the kryon package exports, and the desktop project probe imports Window explicitly. General #program_export component exports stay.
2026-11-25 05:56:17 -03:00
waozi 73567fa4e0 Build the Android renderer artifact without libaom
The default renderer-desktop outputs are decode-only, but the Android
branch still built libaom and wrote it to renderer.json, so every
Android consumer failed with "undeclared artifact output: lib/libaom.a".
Match the declared outputs: dav1d decode, WebP and Opus archives, and
no libaom. The encode artifact keeps libaom.
2026-11-23 08:55:59 -03:00
waozi eb43b8c4bd Decode AVIF with dav1d in the default desktop artifact
The default kryon:renderer-desktop artifact no longer builds or carries
libaom: libavif decodes with dav1d, and the AVIF bridge loads that decoder
lazily. libaom now appears only in kryon:renderer-desktop-encode, which an
app that imports AVIF compression selects. A starter or test build of the
default artifact no longer pays for a libaom build.

mk/codecs.mk grows decoder-archives (WebP, decode-only libavif, Opus and
the shared bridge); scripts/build_avif.py takes --decode-only and drops the
--aom-archive requirement in that mode. desktop-codec-artifact-test checks
that the default artifact declares no libaom archives or licenses, and the
new desktop-codec-encode-artifact-test builds and links the encode artifact.
2026-11-23 07:54:27 -03:00
waozi fc3ebecda7 Build Android's native link from the checked import graph
The Android host no longer needs the scaffold to pass WebP, AVIF and libaom
source directories. The generated link follows the application's imports:
Android's own image decoder serves the Image widget by default,
`kryon/android_avif` adds a dav1d decoder (libaom only when the app imports
AVIF encoding or the libaom engine) and `kryon/android_webp` adds libwebp's
first-frame decoder. Packages declare their native recipes and source
aliases under [tool.android.native].

Android text and emoji come from the system unless `bundled_fonts = true`.
`frame_mode = "events"` sleeps between updates and paces active frames with
the display; `kryon/android_frames` exposes AndroidRequestFrame for worker
and timed wakeups. Adaptive pacing remains the default, and a debug frame
watch reports stalled window-loop work.

The droid scaffold upgrades known stock Gradle, CMake and Activity files and
preserves customized ones, and needs Python 3.11. Pin the avif, webp and
audio packages and Ziran c041afb6, relocked from the pinned packages.
2026-11-23 07:47:29 -03:00
waozi 04d51f7064 Gallery site: Workbook replaces the retired GitHub client, brand icons, Gitea pins
The website's desktop apps list Workbook where the retired GitHub client
was; each card links to its source. The site gains the favicon, apple
touch icon and og:image tags and ships the mascot from assets/brand. The
gallery pins Kryon, Plot and Data Views on Gitea, reads its scene and
theme through std/environment_linux, and its rebuilt site carries nine
new runtime assets.

widget_examples_source_test and site_browser_test expected exactly 101
scenes; the gallery has grown since. Both now compare with the real
catalog built from this checkout's examples.

Local tests: gallery-zx-test (103 bundles), widget_examples_source_test.
site_browser_test still times out selecting the Toggle example by
keyboard: its picker model lands on scene 54; that is separate from
these changes and listed as open.
2026-11-23 04:52:22 -03:00
waozi 6bbe64eee7 Remove legacy and duplicate code with no users left
One way to build: the BSD and GNU make shims (root and examples) and a
go.mod with no Go sources go; everything runs through the Makefile.
Removed after checking every Kryon app and Harmony for users: the
SwipeRow widget and example (gallery entry included), the images_pending
stub, the host/android and host/terminal one-line re-exports, the unused
canvas and DOM HTML shells, system_typeface_linux and
typeface_collection, the tree_label_cost scripts, and the release-notes,
update_version, subset-fonts and update-showcase scripts (Harmony's jobs
plugin keeps its own copies). The profile table no longer presents the
PPM shot as a picture workflow. ClockLinux, SystemClipboardLinux and
FileDialogLinux stay: browser, terminal and Harmony import them. The
tree_draw export stays until explorer and the CSS tests import
kryon/Frame; plans/2026-11-22-legacy-candidates.md keeps that item.
2026-11-22 17:27:21 -03:00
waozi fd3bc9982b Add Chip, ListItem and Skeleton widgets
Phone-style screens kept faking these with styled Buttons and hand
computed rectangles. kryon/chip is a pill label with an optional icon,
selectable or dismissible (a Remove target drawn as x). kryon/list_item
is one pressable row with a leading icon or avatar, a title and
subtitle, and a trailing text, badge, chevron or switch. kryon/skeleton
draws block, line and circle placeholders that pulse with the caller's
clock unless the theme reduces motion. Each sizes itself from theme
tokens, paints where its container places it, reuses Button, Text,
Toggle, Avatar, Badge and Box, and costs nothing unless imported.

Gallery examples (examples/chip, listitem, skeleton) join the generated
catalog, docs/ui-map.json maps li, .chip and .skeleton to them, and the
cheat sheet lists them. new_widgets_test shoots all three light and dark
and drives a chip toggle, a dismissal, a row press and a row switch on a
private display.
2026-11-22 15:34:00 -03:00
waozi d96e17d4e2 Make Android codec libraries reproducible across build roots 2026-11-21 15:38:00 -03:00
waozi 9251193de2 Stream retained ZX rows and serialize shared AVIF builds 2026-11-21 13:43:35 -03:00
waozi 2da7a627f6 Export the gallery examples as ZX again
Kryon's sources load through `--module-path kryon=DIR`, so the exporter
binds the frame entry and names the bundle entry by their package-scoped
module names. An export that names another file than its same-named module,
as `modal` names modal_frame.zi, is imported by its target's own name, and
other facades import from the deepest module root, because a slash in an
import names another package. All 101 examples export and render again. The
docs no longer say the website publishes these bundles; the Components page
runs every example live.
2026-11-18 03:36:11 -03:00
waozi 9926d5bc8e Play every published Kryon web app from the website
The Apps page lists Werkzeug, Inner Breeze, Jungle Academy, Arcade, Shovey,
Apfelwurm and Choano, each with a Play in browser link to its published web
build and its source where that is public. Terminal, Browser, GitHub,
Explorer and Task Manager stay listed as desktop apps, each with the reason
it has no browser build yet; plans/2026-11-18-web-apps.md records what each
one needs. Wide screens show three cards per row.
2026-11-18 03:28:13 -03:00
waozi b5a61b37df Fix Kryon build regressions and consolidate checks
Select Darwin host code for the native ZX player and keep its Linux socket
service on Linux. Feed RGB to the JPEG encoder and retain Android
notification callbacks when generating native host libraries.

Resolve the Pages gallery verifier against the same source revisions as the
build. Reuse prepared template dependencies and check the JavaScript policy
against files present in the checkout. Combine related text-input checks
and perform shared source policy checks once per CI run.
2026-11-18 01:52:02 -03:00
waozi 3627ea8a90 Remove raylib from Kryon
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.
2026-11-17 20:59:37 -03:00
waoziandClaude Opus 5.5 e05146b3ba Host Android apps that run their own frame loop
kryon/android_runtime keeps NativeActivity lifecycle and input in the host
while the application's main owns its loop, widgets and pacing:
PollAndroidHost, BeginAndroidFrame and EndAndroidFrame present Pixmap's
device-pixel damage. The host calls the application's C main by symbol, so
generated C never declares main with Ziran's argument types. Pixmap's
RasterSetTransform and RasterPointFromPixels share one camera for painting
and input.

kryon/pixmap_assets_android decodes owned PNG, WebP and AVIF pictures on
first use, and kryon/pixmap_typefaces_android shapes text with Android Paint
and Canvas through the ordinary typeface_source capabilities.

The renderer-desktop artifact also builds Android ARMv7 and AArch64 codec
archives and the shared AVIF bridge, pinned to AVIF 2611e727.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 13:30:41 -03:00
waozi 156cea179d Reconfigure codec archives when resolved package sources change 2026-11-17 01:23:23 -03:00
waozi 216c190c43 Document only current Kryon APIs and website pages
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.
2026-11-16 21:43:18 -03:00
waozi 9a55dbbbc8 Port the SDL Cairo desktop host to Windows x86-64
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]>
2026-11-16 20:32:27 -03:00
waozi 08f70214c3 Provide native codec archives independently of the raylib renderer
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)
2026-11-16 19:47:52 -03:00
waozi 9ca2e6731b Preserve canonical hosted record identity across package boundaries
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
2026-11-16 16:42:28 -03:00
waozi 9c80f79110 Build Android runtimes with the host zi2c
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).
2026-11-16 04:10:17 -03:00
waoziandClaude Sonnet 5.5 cbbeb1fd54 Accept local-override dependencies in renderer artifact builds
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]>
2026-11-16 01:14:29 -03:00
waoziandClaude Opus 5.5 15c3a22e43 Bring pictures, text input and scroll devices only with the widgets that use 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]>
2026-11-15 23:10:23 -03:00
waoziandClaude Opus 5.5 4108c80a6b Find Kryon's locked edges under a local override, and keep test-driver builds from rebuilding artifacts
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]>
2026-11-15 20:36:56 -03:00
waoziandGLM 4daa24b78c Drop the CUI name from Kryon's style
Co-Authored-By: GLM <[email protected]>
2026-11-14 22:40:47 -03:00
waozi 0678895719 Run ZX apps on Ziran's one executable format
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.
2026-11-14 16:27:22 -03:00
waozi 3ac259c4c2 Generate Android sources for the Android target 2026-11-13 18:07:38 -03:00
waozi b08079641f Keep Android loader entries in generated native graphs
`ziran ir --entry main:main` keeps only what main reaches, so the glue's
JNI_OnLoad, android_fopen's __wrap_fopen/__wrap_fopen64 and a ZX player's
android_main were pruned: libmain.map.txt then failed with "symbol not
defined" for JNI_OnLoad and --wrap=fopen left __wrap_fopen undefined.

The generator now selects the graph through a generated root that forwards
to the stable main(argc, argv) and names the loader entries only on a
negative-argc branch, binding Kryon's entries as host capabilities. The
root never enters the C inputs. The source generation test now uses a
real JNI_OnLoad glue, checks the generated C defines every loader entry,
and links native and ZX graphs through kryon_android_app and
kryon_android_host with the canonical export map.
2026-11-13 17:20:59 -03:00
waoziandClaude Opus 5.5 302939233e Build raylib in the Android renderer artifact project again
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]>
2026-11-13 16:13:22 -03:00
waozi ff07bddbec Simplify hello world and package widget APIs 2026-11-13 04:29:23 -03:00
waozi 2d80834675 Fix nested scroll drags and refresh the live website
- 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.
2026-11-12 18:59:07 -03:00
waozi 9383e95e57 Add the GPU scene renderer, hosted widget aggregates and component packages
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.
2026-11-12 00:12:06 -03:00
waozi e8c6aa25c1 Integrate components and the public UI surface 2026-11-10 15:37:48 +00:00
waozi b570cf3d06 Add multi-select grids and native desktop integration 2026-11-07 23:08:18 -03:00
waozi 34d0ce4ed4 Play Ogg Opus on Windows and ship libopus in renderer artifacts
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.
2026-11-06 20:58:14 -03:00