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

mojo-imkit v0.9.0

Choose a tag to compare

@amarbarosys amarbarosys released this 10 Nov 09:18
· 11 commits to main since this release

mojo-imkit v0.9.0

Released: 2026-11-10 · Commit: tag v0.9.0 · Previous: v0.8.1

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

  • Pure-Mojo image decoders: JPEG (baseline and progressive) and WebP (lossless, lossy, alpha), bit-exact against libjpeg-turbo and libwebp where the format is exact; image_decode picks PNG, JPEG or WebP.
  • 29 generated themes plus amarbaro and amarbaro-light, all passing a WCAG contrast gate that covers text, labels, controls and status colours.
  • A background and 8 icons per style in assets/styles/ (30 styles, 6 MB).
  • Text: six font sizes in the gallery, and heading, caption, separator, badge, kv widgets.

Changes

Added

  • imkit.jpeg (jpeg_decode), imkit.webp (webp_decode), image_decode routing in imkit.assets.
  • imkit.styles (style(name), STYLE_NAMES), generated by tools/gen_styles.mojo from ComfyUI swatches; imkit.contrast (contrast, theme_faults).
  • Themes amarbaro() and amarbaro_light() from the amarbaro.com brand tokens.
  • Widgets heading, caption, separator, badge, kv.
  • assets/styles/<name>/bg.jpg and icons/*.png; scripts/style-assets.sh builds the raw atlases into .work.

Changed

  • flat and neon controls are more visible (button fill vs panel); the gallery's preset buttons share their row and the style button sits on its own row.
  • CI runs on Ubuntu 26.04; the CJK fallback font is resolved per distro.

Fixed

  • Selected-button and badge labels are black or white for their fill (grey labels on dark accents).

Verified

Check Result
tests/jpeg_test.sh PASS: 27 fixtures bit-exact vs libjpeg-turbo, 63 mutants, fuzz without crash, 1280x720 in about 20 ms
tests/webp_test.sh PASS: lossless bit-exact, lossy within the bar, mutants raise, lossless bg 19.7 ms, lossy 64.8 ms
tests/style_test.mojo PASS: 29 generated + amarbaro presets + flat pass the gate; a planted fault is caught
gallery renders, 34 presets button vs panel on the rendered frame >= 1.28 (linear WCAG), gallery_check.sh PASS, OCR reads every badge and the style label
scripts/style-assets.sh PASS: 30 styles, 8 icons each with transparency, 6 MB
CI on Ubuntu 26.04 (ci-local) see the public sync commit

Known limits

  • AVIF is not decoded yet (in progress).
  • The generated themes come from one swatch each; taste is not gated, only contrast.
  • Animated WebP raises.

Upgrade / run

pixi add mojo-imkit   # or uv: mojo-imkit 0.9.0
scripts/gallery.sh .work/shots   # renders every preset

Commits

  • b995b3b docs(readme): amarbaro and built-in shots, eight generated styles, WebP and styles modules
  • e412c05 feat(assets): amarbaro style background and icons (style-assets PASS, 30 styles)
  • d8436c9 docs(api): new widgets, amarbaro and generated themes, contrast, WebP
  • 78fa013 feat: amarbaro themes, heading/caption/badge/kv/separator, 6 font sizes, visible controls
  • 915d7c0 docs(reports): webp lane report with fixture numbers, mutants and memory
  • ee072cc docs(rules): webp lane mistakes
  • c534c5a feat(webp): lossy VP8 key frames and the ALPH chunk, bit exact against libwebp
  • 45b7228 docs(jpeg): api, README row, rules, lane report
  • 961c027 test(jpeg): bit-exact bar and a fuzz run
  • 2649441 feat(assets): image_decode picks JPEG or PNG by signature, pack uses it
  • 7db7c88 perf(jpeg): baseline blocks are transformed as they are decoded
  • 7603983 feat(jpeg): pure Mojo baseline and progressive JPEG decoder
  • a91728d feat(webp): pure Mojo VP8L lossless decoder with libwebp-oracle fixtures
  • 80179f5 fix(gallery): preset buttons share the row equally
  • 24367b7 fix(gallery): style button on its own row inside the panel
  • c8c8a90 feat(assets): 29 style backgrounds and 232 icons
  • 4307fb4 feat(assets): style-assets.sh packs per-style backgrounds and icon atlases
  • ad63dd5 feat(styles): 29 theme presets measured from ComfyUI style swatches
  • e263d25 docs(rules): gpu-wait jobs get PATH and HOME passed explicitly
  • 5b978b9 docs(plans): 28 style themes and assets from the ComfyUI stock styles
  • 26be1ab docs(readme): gallery screenshots in the three presets
  • 5a4432b chore(gallery): submit the render as a shared 2 GB GPU job
  • 495cf83 fix(ci): resolve the CJK fallback font per distro
  • ca2e844 docs(rules): bump pyproject version with every release