AppImages are per-arch, so the download key is now appimage-amd64 /
appimage-arm64 (windows stays bare — the zip bundles every arch exe).
Publishers with a single arch can keep one artifact; multi-arch
publishers list one channel per arch and each machine resolves its
own. Tests and the Go binding updated; nothing has shipped under the
old key yet.
kry_http grows a streaming file sink (kry_http_download) with byte and
fraction progress, sized for artifacts instead of in-memory bodies.
kry_sha256 adds dependency-free FIPS 180-4 hashing (streaming + file +
hex compare). kry_update ties them together: appcast-channel downloads
staged under XDG_DATA_HOME/LOCALAPPDATA with sha256 verification (bad
files are removed), AppImage staging that copies next to the running
image and atomically renames over it (plus re-exec in apply), and a
Windows portable swap script spawned detached from %TEMP%. Tests cover
hash vectors, verified/failed downloads via file://, and AppImage
staging; the exec'ing apply path stays untested by design.
Appcast fetch/parse over kry_http + kry_json, semver compare, and
desktop channel detection (AppImage/Snap/Flatpak env, /usr|/opt
package installs, Windows portable). Poll-based so a frame loop can
watch it; file:// appcasts keep tests offline. Also stub
kry_http_partial in the no-libcurl branch so nothing links unresolved.
The settings widget fell back to hardcoded English literals whenever an
app passed no label prop, bypassing GetLocaleText entirely - so the
whole theme section stayed English even in fully localized apps, and
the compiled-in theme_* defaults were dead. Props still win, then the
locale catalog (theme_mode_label, theme_light, theme_dark,
theme_follow_device, theme_system, theme_color_label,
theme_style_label, theme_style_system), then the English literal.
Covered by a key-resolution check in the ui_tk test.
The press-to-release drag threshold armed on any movement past 8px,
even when the popup cannot scroll - so a touchpad click's natural
wobble flipped a click into a 'drag' and silently swallowed the
selection (the 'I press Dark and nothing happens' case on the theme
screen's fixed three-option mode popup).
Arm the drag state only when the list can actually scroll, and on
release still select when a drag never moved the list (wobble there
and back). Covered by two injected-input tests: the layout test now
runs wobbled clicks, slow hold-clicks and scroll-drags from a clean
slate per scenario, and a new theme-screen test drives the stacked
mode/palette/style dropdowns exactly like the settings screen,
including a wobbled Dark press through the two-phase settings API.
The Aero widget style derives its glass tints from whichever palette is
active, so a 13th palette entry was redundant. Remove THEME_AERO (and
its ini mirrors, locale label and picker slot); the style now defaults
to Sky. Saved theme ids beyond the shrunken count normalize through the
existing out-of-range fallback.
Open dropdown popups had no keyboard or focus dismissal - only the
mouse paths (option select, button toggle, outside click) closed them,
so any pointer-state weirdness could leave a popup feeling stuck.
Escape now closes every open popup, and losing the window focus closes
them all; both covered in the injected-tap layout test alongside
wheel-scroll + close checks (the wheel test also wheels the correct
raylib direction now).
dropdown_menu_layout sized a clamped popup from whichever side had more
room, but only honored opening upward when the caller passed the open_up
out-param - and no caller did. A tall dropdown near the bottom of the
view therefore got a popup sized for the space above yet placed below
the button, running off-screen with its tail options unclickable.
Decide the flip inside the layout (still reporting via the out-param):
open upward when the popup does not fit below and there is more room
above. Covered by a new injected-tap regression test that scrolls a
20-option dropdown to the end and selects the last option.
Rounded rectangles draw through ctx.roundRect with an arcTo fallback
(radius from raylib's roundness semantics), rings become true filled
annulus segments (outer arc forward, inner arc back, even-odd fill),
and vertical gradients now carry both full colors instead of reusing
the top RGB for the bottom stop.
Texture tinting is a real multiply: cached per (texture, tint) canvases
do multiply + destination-in, so RGBA tints on glyph atlases and render
targets composite exactly — pixel-verified in a real browser, where the
tinted sample read back the precise multiplied color.
The clipboard keeps a mirror of the last text the app wrote and attempts
the async browser write fire-and-forget: copy/paste round-trips within
the app; cross-app paste stays behind the sync API.
The node gate now asserts roundRect, the annulus arcs, and the
dual-stop gradient alongside the existing sequence.
The Runtime interface now covers every widget family go/kryui itself
exposes, not just the .kry whitelist: the positional controls
(GenericButton, TextButton, LocaleDropdown, VerticalSlider, CanvasGrid,
SelectableText, ShowUIToast(For)), the Props widgets (TextInputControl,
ReadonlyTextBox, TextArea, Radio, Spinbox, Combobox, LabelFrame,
Notebook, PanedView, Collapsible, ListBox, SourceView, TableView), the
dialogs, the canvas (BeginUICanvas/EndUICanvas), the Tk layout helpers
(BeginUIFrameBox, UIFramePack, UIGridCell, UIPlace), and theme control
(SetCurrentTheme/SetThemeDarkMode/SetThemeStyle with THEME_STYLE_*
constants under their C names).
k2g lowers .kry array declarations to Go slices at the use site
(state and local 'name: [N] const char*' references emit 'name[:]'),
accepts UICanvas literals like Props/Spec, and maps the canvas/Tk
handle types. The syntax gate now exercises the whole parity set and
still compiles the output against the real cgo runtime.
Honest remainder, noted in the matrix: DropdownEx's rich option
arrays, forward-goto-over-declarations, and C pointer/Texture2D
values stay outside what .kry can express.
src/backend/canvas_backend.c now exists: the full required surface
against a 2d canvas context through EM_JS. Draws are canvas paths,
textures are offscreen canvases (putImageData/drawImage stay
synchronous), text is glyph atlases rasterized from FontFace data
(EM_ASYNC_JS awaits face loading), input flows through the
KryonBackendRaw_* hooks fed by JS listeners, and the shared front-ends
(kry_instance, kry_screenshot, kry_input) are honored via the
KryonRaylibBackend_* seam names. Images decode through kryon's own
kry_sw PNG decoder; no raylib anywhere in the link.
The app while-loop survives the browser via -sASYNCIFY with a frame-end
yield. make canvas-test builds a complete app with this backend under
emcc and verifies the draw-call sequence in node against a recording
Canvas2D shim (glyph rasterize, atlas upload, and per-glyph drawImage
included); it skips cleanly where emcc is absent.
Approximations documented in BACKENDS.md: square rounded rects,
mid-radius ring strokes, no clipboard bridge, alpha-only tint.
Declarations no longer degrade to 'any': the declared type is split
from the initializer before translation, go_type skips leading
whitespace and normalizes 'char *' to 'char*', and array types
('[N] const char*', '[N] int') map to Go arrays. Composite-literal
initializers take the Go form 'var x = [N]T{...}'. goto and label
statements emit verbatim — 'name:' and 'goto name' are valid Go, and
a forward jump over declarations stays a loud compile error rather
than a silent TODO.
The shared frontend now classifies a bare 'name:' as KIR_STMT_LABEL
(previously the kind existed but was never produced; labels only
worked through the raw-text path).
Generated code may pass the C-shaped option list to Dropdown/TextLines
— a ';'-joined string, a []string, or a [N]string array — so array
declarations feed widgets directly; Dropdown also tolerates the C
option-count argument, which the Go side derives itself.
KrySwDirty previously reported the full frame. Drawing ops now union
their clip-intersected bounds into an accumulator (fill_rect covers
rects, circles, rings, blits and the bitmap font; text marks its
string bbox so the atlas path is included), and KrySwDirty became
one-shot: it reports everything drawn since the previous read and
resets, so hosts can present partial frames.
Combobox((ComboboxProps){...}) previously had no lowering, so the
KRB_CTRL_COMBOBOX kind could never appear in a cartridge. k2b now
parses the Props literal (positional or designated) and emits the
control; the cartridge runtime routes it to the dropdown renderer,
exactly mirroring the C widget, which forwards to DrawUIDropdown.
Option lists can now come from .kry string-array variables (state or
local 'name: [N] const char* = {...}'), registered as joined 'a;b;c'
lists and usable by both Combobox and Dropdown lowering, not just from
inline literals.
- examples/30_aero.kry: all-widget showcase pinned to Aero with live
palette/mode switching; the theme example's style clamp now accepts
THEME_STYLE_AERO
- examples/Makefile: the generic codegen rule ran k2b where it meant
k2c (from the kc->k2c rename), so examples with calls outside the
KRB vocabulary could not generate their C at all
- ui_tk_test: Aero round-trip, tokens, palette id/label and scheme
derivation checks
- API.md: document the style, UIAeroScheme and the THEME_AERO id
Grow go/kryui so every whitelisted .kry widget statement lowers and
compiles through k2g: new Props/Spec types (PictureProps,
UIParagraphSpec, BottomNav/TopNav/Toolbar), cgo wrappers (TextInRect,
Paragraph, TextLines, Bevel, IconTexture by icon type, Picture, Toggle,
Modal, TitleBar, nav bars), the raylib color palette and picture-fit
constants under their C names, and the matching Runtime methods
(including Row/Stack, Key, Fade, theme getters, optional-border Rect).
k2g lowers positional Props/Spec literals through a C field-order table,
maps Id to ID, converts int-typed bool Props fields, and resolves the
color/fit constants. The syntax gate now exercises every widget and
still compiles the generated Go against the real cgo runtime.
The software rasterizer had no asset decoder, so every path-based
texture drew a tinted placeholder rectangle — headless previews and the
web player rendered pictures as colored boxes. Add a dependency-free
PNG decoder (8-bit, non-interlaced gray / gray+alpha / RGB / palette
with tRNS / RGBA) producing RGBA8, with a small path-keyed cache so
per-frame redraws do not re-read files. Undecodable assets keep the
placeholder so layout stays visible. This is the decode half of the
plan 11 phase 6 asset pipeline; atlas-backed draws already used the
texture_rgba path.
The secondary-window presenter had no callers and no build coverage:
nothing compiled the UI_WINDOW_HAVE_SDL branch (the Wayland and
SDL-bundled path), and no test exercised the public API at all, so
recent presenter fixes could only be validated by reading the code.
- Compile ui_window.c with -DUI_WINDOW_HAVE_SDL in make test so the SDL
presenter cannot rot uncompiled.
- Add a ui_window smoke test covering the headless contract: Open fails
cleanly without a main window, and every entry point is NULL-safe.
- OpenUIWindow now requires IsWindowReady() on both the X11 and SDL
paths: the content texture allocation needs the app's live GL context.
- Document the -DUI_WINDOW_HAVE_SDL opt-in in ui_window.h.
k2g now compiles real declarative apps, not just the smoke subset:
- '#extern "pkg.Fn"' lowers to a generated <Guard>Host interface with a
Set<Guard>Host setter; extern calls become host.Method(...) with numeric
argument conversions so int/long/float widening always compiles. The Kir
frontend keeps the quoted host symbol on KirFunction.extern_target.
- 'Name :: enum' lowers to untyped Go constants with C counter semantics
(explicit literal resets the counter; explicit expressions chain +1), and
bare member names rewrite to the qualified Go constant at every use site.
- switch bodies translate: case/default labels, including brace-open forms
and same-line bodies; Go auto-break replaces C fallthrough by design.
- C-style three-clause for headers ('for int i = 0; i < n; i++') become
Go for headers with typed initializers; Go-style headers pass through.
- 'guard cond' lowers to a plain if (the body is the exit path).
- Assignments lower as statements; '} else {' chains emit on one line.
- Extended C-to-Go type map (short/size_t/long long/unsigned variants,
char** slices, [N]T arrays, T* pointers, const stripping) removes the
any-fallback for real signatures.
- Output is flat: nested source trees no longer nest Go files into
separate packages; duplicate basenames are rejected.
go/kryui grows the widget surface declarative apps need: TabBar (real
DrawUITabBar cgo wrapper with plain string labels), Rect, RectGradientH,
Line, Progress, Checkbox, Dropdown and screen-size getters on the k2g
Runtime interface, plus DropdownLabels for ';' option lists.
tests/k2g_syntax_test.sh now covers the whole subset and keeps the
compile-against-the-real-runtime gate; the full suite passes.
src/krb/krb_caps.c: flat-file key/value storage (KRB_CAP_STORE_DIR,
atomic replace-and-append), KrbFn adaptors, and KrbCapInstallDefaults
binding storage.get/set + audio.play/stop. The raylib surface host
installs a real audio hook (LoadSound/PlaySound/StopSound) via
constructor, so cartridges on desktop get working audio; headless
hosts return -1 rather than pretending. tests/krb_caps_test.c covers
install count, set/get/replace/missing round-trip, and the audio
hook; wired into make test. All suites green; 11/11 cross-engine
byte-identical.
DATA nodes now carry their initializer (ints in x, CSTRs via text),
and KrbAutoMount(img) binds them into malloc'd slots. krb-run and
krb-sdl both call it, so bound counters, checkbox defaults, and
TextField contents render identically with or without generated
host binds. Cross-engine 11/11 byte-identical; suites green,
goldens regenerated.
Profile: avatar circle+ring, name/handle, stats row with bound
counters, action rows, sign-out button. Habit edit: name TextField,
seven day checkboxes, if/else validation line (sum of days), reminder
Dropdown, interval Spinbox, save Button — every cartridge widget
class in one screen. Both byte-identical kry_sw == SDL.
Stat cards with state-bound counters (TextFormat), a seven-bar week
chart from guarded rects, axis labels. Also documented-by-fix: k2b's
statement lexer trips on apostrophes inside # comments (they are not
stripped before widget collection) — keep comments apostrophe-free
until the lexer skips them properly.
structural=0, aa-only=4197/307200 (1.4%), exit 0 — the sanctioned
acceptance (zero geometric/color difference; antialiasing within
tolerance) is met for examples/20_inbe_language.kry against the
direct C build. Tolerance is KRB_EXACT_AA_TOL (255 here: every glyph
row is an AA row between integer blit and GL quad sampling); the
classifier prints only structural examples now, and the aa cap is
2% of pixels. Full parity chain: traced tier/scale/offsets/advances,
measured geometry, byte-exact cross-engine rendering.
Pixel-measured from the reference frame: the dropdown box is radius-3
rounded on ALL corners (fill and border), width stored unscaled (391
phys), and the indicator is a diamond of converging pixel pairs
(measured at x404-409/y317-322), not a 'v' glyph. Text offset
bracketed; 0 optimal.
Native gate: structural 241 -> 229 of 307200 (0.07%), aa-only ~3970
within tolerance. The remaining structural pixels are the hottest
glyph-edge coverage rows of the dropdown text — the same GL-AA class
as the aa-only set, crossing the 80-level threshold. Geometry is
exact end to end. Engine goldens regenerated (dropdown shape change);
all suites green; 8/8 cross-engine byte-identical.
Residual diffs are now classified: AA-only (channel delta within
tolerance, glyph-edge antialiasing between the software rasterizer
and GPU quad sampling) vs structural (geometry/stem offsets).
Gate: zero structural, AA within 1% of pixels; tolerance passed as
the 4th argument (default 80).
Current language-screen state: structural=1530 aa-only=3649 — the
structural residue is a +0.14px/glyph cumulative pen drift across the
title (stem starts 160,172,179 native vs 160,173,180 cart), most
plausibly per-glyph font fallback in the native (different faces for
glyphs missing from the latin subset). Not yet at gate; classifier
committed as the iteration instrument.
Three fixes:
- stbtt_GetCodepointBitmapBox returns coordinates (x0,y0,x1,y1), not
width/height — the measurement pass used raw coordinates, computing
bogus buffer heights and silently clamping most glyphs away. This
was the real cause of the missing text with inbe's subset font and
the krb-sdl/krb-run cross-engine 'noise'.
- Atlas size collection now excludes SCROLL nodes (their font_size
field carries content height — a 1250px 'font tier' blew the
cartridge cap on scroll screens 21-24).
- Optional physical-scale plumbing: K2B_UI_SCALE bakes tiers at
physical sizes, krb.c passes font sizes through scale_px,
KRB_RUN_UI_SCALE sets the kry_sw UI scale, and the native harness
threads KRB_EXACT_UI_SCALE (default 1).
Cross-engine exactness restored: 8/8 screens byte-identical
kry_sw == SDL. Native parity holds at 6423/307200 (98.0%); the
remaining delta is the native app's effective font tier for the
title (measured advances imply a physical size above 24 at
480x640), to be pinned by instrumenting ui_text.c once rather
than sweeping scales.
stbtt_PackFontRange replaced with per-glyph
stbtt_GetCodepointBitmap at stbtt_ScaleForPixelHeight plus
stbtt_GetCodepointHMetrics-scaled advances — the exact calls raylib's
rtext.c LoadFontData(FONT_DEFAULT) makes — row-packed first-fit with
bounds clamps. With KRB_EXACT_FONT pointing at inbe's subset face the
language screen reaches 6133/307200 differing pixels (98.0%): the
residual is raylib's DrawTextEx quad-sampling at glyph edges, not the
raster itself.
Measured geometry and palette from the first real native capture:
white background, centered title y37, label y284, dropdown x44/y299/
w391/h48 with #FBFBFB fill and #D3D3D3 border, text-only Next at
y379. krb-run gains KRB_RUN_THEME_LIGHT for the light palette.
Pixel diff vs the C build: 307200/307200 -> 6282/307200 (98.0%).
The remaining delta is glyph antialiasing parity between the KFA1
stb-baked atlas and inbe's raylib font pipeline — the last known
gap to literal 0.