RUST.md: record I1 -- parley and the atlas, and what is still unmeasured

Iris decided for parley directly rather than through the comparison this
step described, and asked for the glyph atlas with it, so the step is what
was built rather than what was chosen between. Records the view count
dropping from 6 to 1 as the evidence the atlas is doing its job, and says
plainly that the speed claim behind the TODO is still unmeasured in both
directions -- it wants I5's transcript screen to be worth timing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
irisandClaude Opus 5 committed 2026-09-04 19:28:22 -04:00
1 parent ff7e9c0435
commit 1a97d0ef5c
1 file changed
+56 -11
+56 -11
View File
@@ -648,17 +648,62 @@ step measured.
latent on Wayland only because winit asks for a redraw after a resize latent on Wayland only because winit asks for a redraw after a resize
by itself; on Android, where the surface work of I2 will not have by itself; on Android, where the surface work of I2 will not have
winit underneath it, nothing else here would have asked. winit underneath it, nothing else here would have asked.
- [ ] **I1 — the text stack decision.** iris uses cosmic-text; the - [x] **I1 — parley, and a glyph atlas (done 2026-09-04).** No bake-off:
transcript needs rich inline spans (links, code chips, colour), Iris decided for parley directly ("I wanted to switch it to parley
selection across many widgets with the platform's handles on the anyways"), and then asked for the atlas as well ("just do the atlas,
phone, and an editor the IME can drive (composition regions, not commit to it, we do want it"). Both are in.
just committed characters). Compare cosmic-text and Parley against
exactly those three, in iris, on a real transcript's text. Parley **What parley bought, beyond shaping.** Its editing model addresses
is the expectation because android-view's IME bridge and AccessKit's text by byte offset into one string, where cosmic-text used
text properties are written against it; measure rather than assume. `(line, index)` — so `select_content`, `delete_between`,
Pass: a written decision here with what each was tried on, and the `insert_inner` and `newline` collapse into ordinary string
TODO's "text resizing per frame is really slow" measured and either operations. Bigger: `Selection::geometry` and `Cursor::geometry`
fixed or explained. replace `iter_layout_lines`, `index_x` and `cursor_pos`, which walked
runs by hand to place the caret and the selection boxes and were not
bidi- or wrap-correct. `edit.rs` lost about 130 lines and gained
Home/End. Its cursor motions map onto parley's `next_visual`,
`previous_visual_word`, `next_line` and so on, in one function.
**The atlas is what "text resizing (per frame) is really slow"
was.** Every string used to be rasterised into its own `RgbaImage`
and uploaded as a whole texture whenever anything about it changed,
so a window resize re-rasterised and re-uploaded every visible
string. Now a glyph is rasterised once per font, size and subpixel
phase, shared by every string that contains it, and a resize
re-emits quads without touching the GPU's copy. **The tabs example
reports it: `views`, the number of texture views bound, went from 6
to 1** — six per-string textures became one shared page. Supporting
pieces: a `GLYPH` primitive that samples a sub-rectangle and tints
it (the existing texture primitive samples a whole texture), a
`Patch` texture update so a new glyph costs its own bytes rather
than a 4 MB page, and `GpuTextures` keeping its `Texture`s, since a
view cannot be written through.
**Not yet measured**, and the honest gap in this step: the TODO's
"really slow" was never given a number, so neither is the
improvement. What is evidence rather than argument is the view count
and the shape of the work — a resize no longer rasterises. A
before/after timing wants the transcript screen of I5 to be worth
taking.
**Two bugs found on the way**, both pre-existing: `primitives!`'s
`@count` rule recursed comma-separated while matching
space-separated, so it terminated only for exactly two primitives
and adding a third hit the recursion limit; and `Color` had no
`Default`, which parley's `Brush` requires.
**Fourteen tests**, iris's first. The editor is the one part that is
pure logic rather than something needing a GPU and a window, and it
was rewritten wholesale with no way to exercise it — synthetic input
does not reach a client under the headless compositor, which has no
seat devices. Two of the tests are aimed at what the rewrite could
plausibly have broken: the IME preedit path, and editing multi-byte
text now that offsets are bytes.
Dropping cosmic-text and unicode-segmentation also retired two
nightly gates — `portable_simd` (the old glyph compositing) and
`gen_blocks` (the deleted line iterator). **Eleven left.**
- [ ] **I2 — iris on android-view.** An `android-view` surface as a second - [ ] **I2 — iris on android-view.** An `android-view` surface as a second
backend beside winit: `wgpu` on the view's surface (GLES here, see backend beside winit: `wgpu` on the view's surface (GLES here, see
the Vulkan section; Vulkan on the phone), touch as pointer events, the Vulkan section; Vulkan on the phone), touch as pointer events,