iris: share resource handle bookkeeping

This commit is contained in:
iris committed 2026-09-12 17:13:49 -04:00
1 parent a8093b002b
commit c97df72015
10 files changed
+642 -225

No files matched your search

+11 -8
View File
@@ -818,14 +818,17 @@ event types or manually request redraws.
them by the same string used by text widgets. The public boundaries accept
`AsRef<str>`, so an application can use bare strings or put its own semantic
enum in front of them without Iris hardcoding the roles. Text buffers, layouts,
and prepared glyphs live in a per-`Ui` generational arena; a text widget holds
one compact handle into it, while the arena and its shaping state are shared by
one `Rc<RefCell<_>>`. Registering another family invalidates the live arena
entries and dirties their active owner widgets, so registration is also valid
after the first shape. ai-app owns the `ai-app-icons` family, its Nerd Fonts
subset, its codepoints, its license and the script that rebuilds it; the CSS
generic names `sans-serif` and `monospace` continue to resolve through the
platform.
and prepared glyphs live in a per-`Ui` `Resources<TextRsc>` generational arena;
a text widget's `TextHandle` wraps the UI-local `RscHandle` into it. The same
generic arena owns texture and managed-paint lifetimes. Its `StrongRscId` and
`WeakRscId` are sendable IDs rather than data pointers; clone and drop events
cross one arena-owned standard channel, and reference counts remain in the
arena instead of allocating one atomic counter per resource. Registering
another family invalidates the live text entries and dirties their active owner
widgets, so registration is also valid after the first shape. ai-app owns the
`ai-app-icons` family, its Nerd Fonts subset, its codepoints, its license and
the script that rebuilds it; the CSS generic names `sans-serif` and `monospace`
continue to resolve through the platform.
`cargo-iris` is an installable Cargo subcommand, rather than a script callers
must find inside an Iris checkout. `cargo iris apk` builds the Rust `cdylib`