Skip to content

oxiforge 0.3.0

Choose a tag to compare

@hsteinhaus hsteinhaus released this 12 Jun 16:56
· 10 commits to master since this release
a033460

A memory-efficiency release on oxivgl 0.4.0: generated views now pay one
lv_style_t per distinct style treatment instead of per widget, the last
per-create heap leaks are gone, new YAML surface covers background images
and per-view resource budgets, and the JSON schema is generated from the
model types.

Added

  • Background-image style props — bg_image_src (an extern
    lv_image_dsc_t symbol; oxiforge emits the declaration, the app links the
    asset), bg_image_opa, bg_image_recolor, bg_image_recolor_opa,
    bg_image_tiled. Usable in style_definitions, inline widget styles,
    state/part styles, and directly on pages — a whole-screen backdrop is a
    page-level styles: ref. (#30)
  • Per-view resource budgets. budget: { max_objects, max_depth } on a
    page or toast emits oxivgl::diag::assert_budget after creation — a
    debug-build tripwire so a widget-count regression fails CI/HIL instead of
    OOMing a constrained target. No-op in release builds. (#33)
  • The JSON schema is now generated from the model types (schemars behind
    the new schema feature; gen_schema bin) and covers all 34 widgets and
    every property the parser accepts — the previous hand-written schema was
    stale at the 0.1.0 surface and structurally rejected valid documents. A CI
    drift test fails when model.rs changes without regeneration. (#35)

Changed

  • oxivgl dependency bumped 0.3.3 → 0.4.0 — shared-style model
    (deprecated inline setters), diag resource toolkit, background-image
    API. (#30)
  • Referenced styles are built once per create_*() and shared by every
    referencing widget (hoisted let style_<id> = style_<id>();). Previously
    N references built N duplicate lv_style_t, resident for the view's
    lifetime. Zero visual change. (#30)
  • Page/toast-level style props build a shared Style applied via
    add_style instead of the Obj inline setters deprecated in oxivgl
    0.4.0. The old screen-only prop subset is gone: previously
    silently-dropped page props (pad_all, radius, …) are now emitted. (#30)
  • Structurally identical anonymous styles are deduplicated within a
    create_*() — inline/state/part styles with the same setter body share
    one lv_style_t. (#32)
  • model::Page, model::ToastDef gained a budget field and
    model::StyleProps gained the bg_image_* fields
    — code constructing
    these types literally must add the new fields; the YAML schema is purely
    additive. (#30, #33)

Fixed

  • Grid-track and AnimImg frame arrays no longer leak per create_*().
    Both are compile-time constants and now live in function-local statics
    (frame arrays behind a generated Sync wrapper) instead of
    Box::leak — previously an accumulating leak on any repeatedly-opened
    view using layout: grid or anim_img. (#31)
  • A one-sided grid_columns/grid_rows no longer generates
    uncompilable code
    — the absent axis gets a terminator-only dsc
    array. (#31)
  • Image symbols in toasts are now declared. Symbol collection scans
    pages and toasts — AnimImg/Imagebutton sources inside a toast
    previously produced undeclared-symbol errors. (#30)
  • style_definitions gradient refs are validated (previously
    unchecked); bg_image_src is validated as a Rust identifier. (#30)
  • Documentation rot swept. README/CLAUDE.md no longer describe the
    abandoned Box::leak + mem::forget model; the YAML spec documents the
    full 0.2.0/0.3.0 surface (events, toasts, views, feature-gated widgets)
    and marks theme: as reserved; CR docs carry resolution statuses. (#36)