Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

mojo-imkit v0.8.1

Choose a tag to compare

@amarbarosys amarbarosys released this 09 Nov 22:21
· 15 commits to main since this release

mojo-imkit v0.8.1

Released: 2026-11-09 · Commit: bf8770c · Previous: v0.8.0

What it does

An immediate-mode GUI for Mojo apps, drawn by one GPU compose kernel over the app frame. System SDL3 presents the window and FreeType builds the glyph atlas.

Highlights

  • An app that composes into its own buffer holds 5.6 MB instead of 13.5 MB (9.3 MB through SDL render()).
  • Nine bugs fixed: clip nesting, NaN and infinite commands, UTF-8 Backspace, glyph-cache key collision, PNG header checks, set_image/set_assets overwrite, DPI scale for glass and icons, missing font sizes, scroll/axis with zero or NaN.

Changes

Added

  • tools/membench (bytes, mallocs, compose time) and tools/uibench (CPU frame time).
  • scripts/ci.sh dry-runs the mutants.

Changed

  • Layer.scene, Layer.pixels and the host font atlas are allocated when first used.
  • push drops NaN commands and clamps coordinates: UI frame about 0.9 us slower (+4 %).

Fixed

  • The nine bugs above, each with a test that failed before its fix.

Verified

Check Result
scripts/ci.sh at e20b1b7, clean worktree PASS
scripts/local_gate.sh (ui_test on gfx1100, window, audio) PASS
scripts/mutants.sh PASS

Known limits

  • Compose kernel time unproven below about 2 % (17.1 to 17.4 us measured on a loaded box; kernel source unchanged).
  • examples/gallery binary +1.1 %.

Upgrade / run

None

Commits

  • e20b1b7 ci: dry-run the mutants in ci.sh; repair the two push mutants; docs and report
  • 7cbbe52 perf(draw): one vector clamp and NaN test in push
  • 45204fe fix(ui): scroll rows and axis labels survive zero, NaN and huge numbers
  • 2b95130 fix(font): glyph cache key keeps size slots 16 and up apart
  • def3b03 fix(draw): a font size index the font lacks draws nothing
  • 16c3986 perf(layer): allocate the pinned pixels buffer on the first readback
  • d8b13b4 perf(font): hold only the atlas rows in use on the host
  • 9434c66 perf(layer): allocate the scene buffer on the first set_scene
  • 781e172 fix(layer): set_image and set_assets no longer erase each other
  • 6284716 fix(draw): NaN commands drop, infinite coordinates clamp
  • 20b7084 fix(assets): png_decode refuses a bad IHDR length and an oversized picture
  • 696025b fix(ui): field Backspace and tail cut on UTF-8 code points
  • 4d9e547 fix(ui): glass and icon_img follow the DPI scale
  • e9f22df fix(draw): end the old clip when a new one replaces it
  • 882fc71 tools: membench, a memory and speed ledger of the demo frame
  • 732b335 docs(rules): mistakes from the v0.8.0 lanes and merge