From 10500ae8aa5675235853bbab47a105fff3260180 Mon Sep 17 00:00:00 2001 From: iris <2+iris@noreply.localhost> Date: Fri, 4 Sep 2026 18:38:35 -0400 Subject: [PATCH] RUST.md: record what E1 showed, and drop an overreaching comment E1 is part-done: the Masonry demo builds with cargo-ndk and Gradle and renders, and ui-trace reads its AccessKit tree, so the bench rig's tap-by-name would work against a Masonry screen. The keyboard half -- the condition the whole framework decision turns on -- was not reached, so the box stays open. Also records that two variables changed at once between the crashing and working runs, so neither can be credited yet. The vsync comment claimed a redraw burst here lands on the host's desktop. That was my attribution for a freeze which turned out not to be mine, and it is machine-specific reasoning that has no business in a library's source. The battery argument is the whole reason and stands on its own. Co-Authored-By: Claude Opus 5 --- RUST.md | 46 ++++++++++++++++++++++++++++++++++++++ iris/src/default/render.rs | 10 ++++----- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/RUST.md b/RUST.md index 0ccc49d..ff0493d 100644 --- a/RUST.md +++ b/RUST.md @@ -436,6 +436,52 @@ accepted. builds with `cargo-ndk` + Gradle, renders on the GPU, and the phone's own keyboard types into its editor with autocorrect and suggestions. Note which `wgpu` backend it took and any environment flags needed. + **Part-done 2026-09-04; the keyboard half is untested, so the box + stays open.** + + *Builds and renders.* `~/src/android-view` at `bec6c62`, built with + `cargo ndk -t x86_64 -P 26 -o masonry-app/src/main/jniLibs/ build -p + android-view-masonry-demo` and `./gradlew :masonry-app:assembleDebug`. + The demo draws: its text field and "Add task" button appear, laid out + correctly. Note the demo's README says `arm64-v8a`; this emulator is + x86_64. **`libmain.so` is 181 MB in debug and 11 MB in release**, + which is the single loudest number about Vello's dependency graph. + + *Accessibility works, which E2's condition 6 depends on.* `ui-trace` + reads Masonry's AccessKit tree: "Add task" comes through as a named + `Button` and the editor as an `EditText` node. So the bench rig's + tap-by-name would work against a Masonry screen — for controls that + carry a name. The demo's editor does not, so a coordinate was needed + for it, which is a demo omission rather than a framework one. + + *The keyboard was not reached.* Tapping the editor never brought the + IME up (`mInputShown=false` throughout) before the run ended. Nothing + here says android-view's `InputConnection` does not work — only that + it has not been shown to. This is the half of E1 that matters most, + since it is the constraint the whole framework decision turns on, and + it is what to do first when this is picked up. + + *A crash worth knowing about, seen once.* With an accessibility + client attached the app aborted, and the stack attributes it + precisely: `android_view::view::do_frame` → + `CallbackCtx::finish` → `accesskit_android::event::QueuedEvents::raise` + → `send_completed_event` → `unwrap()` on `Err(JavaException)`. + android-view builds with `panic = "abort"`, so a JNI call that throws + takes the process. It did **not** reproduce: two plain + `ui-trace record` runs afterwards left the app alive, so the trigger + is narrower than "an accessibility client is connected" and is not + yet known. Recorded rather than chased because it is upstream and + one unwrap wide. + + *Two changes were made at once and cannot be separated.* The first + launches crashed in `Surface::configure` ("Invalid surface") on GLES, + then, with Vulkan enabled, segfaulted inside the emulator's own + driver (`vulkan.ranchu.so`, `SetDebugUtilsObjectNameEXT`) while wgpu + labelled an image view — a debug-build-only call. It then ran after + **both** a switch to a release native library and a switch to a + software-rendered emulator. Which of the two fixed it is unmeasured; + whoever picks this up should vary one at a time rather than inherit + the assumption. - [ ] **E2 — a transcript in Masonry.** One screen: open a sandbox session, page 800 events into `VirtualScroll` bottom-anchored, draw markdown from `pulldown-cmark` into Parley rich text with links and code diff --git a/iris/src/default/render.rs b/iris/src/default/render.rs index 77829cc..b317498 100644 --- a/iris/src/default/render.rs +++ b/iris/src/default/render.rs @@ -115,12 +115,10 @@ impl UiRenderer { format: surface_format, width: size.width, height: size.height, - // Vsync, because a UI toolkit aiming at battery life must not - // present frames a display will never show. AutoNoVsync accepts - // them as fast as the GPU will take them, so a redraw burst costs - // whatever the hardware can be made to do rather than one frame -- - // and on this machine the GPU is the host's real one, reached - // through virtio-gpu, so that cost lands on somebody's desktop. + // Vsync, because a toolkit aiming at battery life must not present + // frames a display will never show: AutoNoVsync accepts them as + // fast as the GPU will take them, so a redraw burst costs whatever + // the hardware can be made to do rather than one frame. // AutoVsync picks Fifo, which every backend supports. present_mode: PresentMode::AutoVsync, alpha_mode: surface_caps.alpha_modes[0],