Skip to content

feat: v0.22.0 β€” edition 2024 modernization + layout/render perf + honest lightness docs#277

Merged
subinium merged 1 commit into
mainfrom
release/v0.22.0
Jun 11, 2026
Merged

feat: v0.22.0 β€” edition 2024 modernization + layout/render perf + honest lightness docs#277
subinium merged 1 commit into
mainfrom
release/v0.22.0

Conversation

@subinium

@subinium subinium commented Jun 11, 2026

Copy link
Copy Markdown
Owner

v0.22.0 β€” Rust modernization + optimization release

No new widgets or features. This cycle modernizes the toolchain posture, fixes measured performance issues in the layout/render hot path, and makes every "light" claim in the docs true. Public API surface unchanged.

Toolchain & hygiene

  • Edition 2024 for superlighttui and slt-wasm; MSRV 1.81 β†’ 1.88 (let-chains, stabilized 1.88). CI MSRV gate updated.
  • indexmap direct dependency removed β€” it was an MSRV-pin with zero src/ usage. Resolved dep tree: 13 β†’ 10 (no-default-features), 28 β†’ 25 (default) vs 68 for ratatui + crossterm. unicode-segmentation upper bound dropped.
  • [workspace.lints] table shared by both crates; lib-only hygiene lints (missing_docs, unreachable_pub, clippy unwrap_used/print_stdout/… family) deliberately stay as lib-target inner attrs so examples/tests aren't flooded. cargo clippy --all-features --all-targets -- -D warnings is clean.
  • ~50 nested if-let pyramids flattened to let-chains; core::error::Error impls; OnceLock β†’ LazyLock where const; #[must_use] on remaining builders; 17 never-public terminal methods pub β†’ pub(crate).
  • 36 doc_cfg annotations β€” docs.rs now shows which feature each gated API needs.
  • Edition-2024 unsafe env fallout: #![forbid(unsafe_code)] stays for every shipping build; two mutex-serialized #[cfg(test)] env helpers carry audited exemptions.

Fixed

  • Startup deadlock on terminals that never answer capability probes β€” the DA/OSC/DECRPM reply readers gated a blocking stdin read behind crossterm::event::poll() (which reports crossterm's internal queue and consumes bytes from the same descriptor). On hosts that answer nothing (detached tmux panes, script/CI PTYs), apps hung forever on a blank alternate screen before the first frame. Replies are now pumped through a dedicated 1-byte reader thread awaited with recv_timeout β€” every probe is hard-bounded by its budget (≀180 ms at startup). Verified: detached-tmux e2e renders in <3 s and quits cleanly where it previously deadlocked; input integrity intact (kΓ—3 β†’ exactly 3). Residual on fully silent hosts: ≀1 byte of typeahead, vs. the previous unbounded hang. Adversarially reviewed (concurrency, nudge echo, parser tolerance β€” all 3 review warnings fixed).

Perf (measured, criterion + v020_perf_audit)

  • Intrinsic-size memoization on LayoutNode removes O(nodes Γ— depth) per-frame re-measurement on deep trees; output byte-identical (full proptest suite + 2 new invalidation regression tests); new layout_deep_tree_120x40 bench (depth 14).
  • dim_buffer_around rewrite to contiguous row-slice ops: small modal 61.9 β†’ 53.5 Β΅s, large modal 59.2 β†’ 48.2 Β΅s, full scan 106.4 β†’ 55.0 Β΅s (200Γ—60) β€” fixes the measured regression from perf(layout): replace dim_entire_buffer O(WxH) with modal-aware diff pathΒ #228.
  • Line-hash double-recompute hypothesis investigated and refuted (line_dirty already makes it near-free; flush/static_200x60 β‰ˆ 114 ns) β€” honest no-op.
  • Guard benches: layout_nested_rows_cols 40.2 β†’ 32.2 Β΅s, full_render_120x40 38.4 β†’ 36.2 Β΅s, animation/churn_200x60 within noise.

Docs

  • False "Dependencies: 2" claim in COMPETITIVE_ANALYSIS.md replaced with measured numbers (4 direct required / 25 resolved vs 68). All README taglines (en/ko/ja/es/zh) reframe "light" as dependency footprint + API surface and explicitly do not claim smaller binaries (measured ~1.45Γ— ratatui's hello) or faster cold builds.

Verification (local, all green)

All 11 gates: fmt --check, check --all-features, clippy --all-features --all-targets -- -D warnings, test --all-features (1790+ tests, 0 failed), check --examples, typos, no-default-features, WASM target, cargo hack --each-feature (29 combos), cargo audit, cargo deny check.

Note: the MSRV 1.88 gate is verified by CI (no 1.88 toolchain locally); it is the one gate not reproduced on-box.

πŸ€– Generated with Claude Code

…est lightness docs

Rust modernization and optimization release; no new features, public API
unchanged.

Toolchain & hygiene:
- Edition 2024 for both crates; MSRV 1.81 -> 1.88 (let-chains)
- unicode-segmentation upper bound dropped; indexmap direct dep removed
  (MSRV-pin only, zero src usage) β€” resolved deps 13->10 (no-default),
  28->25 (default)
- [workspace.lints] table; lib-only hygiene lints (missing_docs,
  unreachable_pub, clippy unwrap/print/dbg family) stay as inner attrs;
  clippy --all-targets -D warnings now clean
- core::error::Error impls, OnceLock->LazyLock where const,
  #[must_use] on remaining builders, ~50 if-let pyramids -> let-chains
- 36 doc_cfg annotations so docs.rs shows feature requirements

Perf (measured):
- Intrinsic-size memoization on LayoutNode kills O(nodes x depth)
  re-measurement on deep trees; byte-identical output (proptests green);
  new layout_deep_tree_120x40 bench
- dim_buffer_around/dim_entire_buffer rewritten to contiguous row-slice
  ops: dim arms 61.9->53.5us, 59.2->48.2us, full scan 106.4->55.0us
  (200x60), fixing the measured #228 regression
- Line-hash double-recompute hypothesis investigated: line_dirty already
  makes it near-free; honest no-op

Docs:
- False "Dependencies: 2" claim replaced with measured numbers
  (4 direct / 25 resolved vs ratatui 68); all READMEs reframe "light" as
  dependency footprint + API surface, explicitly not binary size

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@subinium subinium merged commit 0c70ed5 into main Jun 11, 2026
16 of 17 checks passed
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.

1 participant