Skip to content

feat: add bitmap surface protocol and renderer - #141

Open
gold-silver-copper wants to merge 10 commits into
orhun:mainfrom
gold-silver-copper:agent/rebase-pr-133-rio-vt
Open

feat: add bitmap surface protocol and renderer#141
gold-silver-copper wants to merge 10 commits into
orhun:mainfrom
gold-silver-copper:agent/rebase-pr-133-rio-vt

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

This replaces #133 on current main and completes the Rio VT ownership migration begun in #140.

  • add the Ratty Bitmap Surface Protocol v1 parser, bounded transfer/lifecycle state, renderer, examples, configuration, and protocol documentation
  • make rio-vt the sole owner of terminal parsing, external placement mutation, Kitty wire parsing, image/placement lifetime, and replies
  • consume Rio's terminal-owned placement geometry for Ratty bitmap/RGP objects across partial/full scrolling, history eviction, resize/reflow, and screen swaps
  • render Rio's native direct and Unicode-placeholder Kitty placements with stable, bounded Bevy image assets
  • enforce encoded/decoded/resident/pending object limits, incomplete-transfer expiry, checked dimensions, explicit direct-only Kitty media policy, and bounded synchronous RGP mesh decoding

Rio dependency

Ratty pins the coordinated draft raphamorim/rio#1859 at immutable revision 535495772f8548e2cbf9a840938c8eca21714888.

That upstream change supplies the supported external-placement API and corrects native Kitty placement/deletion/retransmission/resource semantics. Ratty no longer reconstructs VT scrolls or maintains a second Kitty protocol state machine.

Verification

  • cargo +1.96.1 fmt --all --check
  • cargo +1.96.1 check --all-targets --locked
  • cargo +1.96.1 clippy --all-targets --locked -- -D warnings
  • cargo +1.96.1 test --all-targets --locked — 231 library, 7 bitmap-frame example, and 4 pan/zoom example tests passed
  • RUSTDOCFLAGS='-D warnings' cargo +1.96.1 doc --locked --no-deps
  • widget fmt --all --check, check, and clippy --all-targets -- -D warnings
  • git diff --check

Automated stream fixtures cover Kitty 0.46.1-compatible unpadded RawStd, zlib, chunking, capability queries, and Unicode placeholders. Manual GPU/visual validation with Kitty 0.46.1 remains outstanding.

Review notes

The complete 22-file diff was reviewed against merge base cb0b625ae2ed92ea23a3651b17c110a1e8130eb5, including the coordinated Rio diff. Resource-exhaustion, Kitty deletion/retransmission/capacity/ID-lifetime, file/shared-memory bounds, alternate-screen/ED2 lifetime, RGP parser/decoding ownership, and stale-transfer findings were fixed and covered by regressions.

Two renderer constraints are documented: partially clipped arbitrary 3D RGP meshes keep their full model transform and do not yet receive an exact per-placement fragment scissor; ordinary negative Kitty z-order cannot be placed between cell backgrounds and glyphs while those layers remain combined in one terminal texture. Extreme-negative/default-background behavior and Kitty-to-Kitty z ordering are preserved.

@gold-silver-copper
gold-silver-copper marked this pull request as ready for review August 11, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants