Skip to content

gpui-rhai 0.3.2

Choose a tag to compare

@eddix eddix released this 29 Oct 12:20
· 104 commits to main since this release

gpui-rhai 0.3.2

Release date: 2026-10-29. A patch release, compatible with 0.3.1. Runtime API
stays 3, gpui-pre/core/platform stay 0.3.7 and MSRV stays 1.95. Upgrade
core, registry and CLI together.

Virtual collections, such as a Table's body, now render ahead in batches and
keep the items a scroll leaves, so scrolling runs the renderer and commits the
view far less often. The values are the application's: per collection, per
Table, or as a Host default. The full list is in the
CHANGELOG.

New

  • Rendering ahead and keeping items (decision D73). virtual_collection
    takes three settings:

    • overscan_items: items rendered beyond each edge of the viewport. When
      set, it replaces overdraw_pixels, which keeps working.
    • batch_items (16 unless set): a scroll that needs items also renders the
      ones after them in the direction it is going.
    • retain_items (200 unless set): items a scroll left come back without
      running the renderer until the collection renders again. An item whose
      component owns an effect, a timer or a signal is released as before.

    A frame asks for a render only when it needs an item, so scrolling inside a
    rendered batch commits nothing. Scrolling a Table 64 rows one row per step
    rendered on 4 steps instead of 63. See
    Rendering ahead and keeping items.

  • Host defaults. RuntimeEngine::set_virtual_collection_policy, called in
    ScriptViewExtension::configure_engine, sets the values for every
    collection in the view; a collection's own value wins. The policy type is
    VirtualCollectionPolicy.

  • Table 0.3.2 takes overscan_rows, batch_rows and retain_rows and
    passes them to its body. See
    Rendering ahead and keeping rows.

An item rendered ahead that fails does not fail the items the frame needs: the
realization is retried without the batch. A kept item keeps its data reads, so
a change to data it read renders the collection again rather than bringing back
a stale row.

Upgrading from 0.3.1

The new defaults apply to every virtual collection with the 0.3.2 runtime,
without a source update. To return to rendering one item at a time and
keeping none, set batch_items: 1, retain_items: 0 on a collection, the
batch_rows/retain_rows props on a Table, or a Host policy with
batch_items: Some(1) and retain_items: Some(0). Tests that count
realizations exactly may want those values.

Upgrade the CLI first, then run gpui-rhai update to bring Table 0.3.2.
Merges keep local edits and write conflicts to .gpui-rhai/conflicts/.

Verification

Before the release, on macOS: format and strict Clippy for the workspace,
tests/native-keyboard, the apps and the grain backend; cargo +stable check;
cargo doc with warnings denied; the workspace tests (867), the default-feature
library tests (606) and the native suite (653), including four new Table tests
for batches, kept rows, a new render dropping kept rows and the Host policy;
generated references current. CI ran the stable, portable, native, release and
apps jobs on the merged pull request (#212).