feat: v0.22.0 β edition 2024 modernization + layout/render perf + honest lightness docs#277
Merged
Conversation
348a4b6 to
b914cda
Compare
β¦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>
b914cda to
427c428
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
superlighttuiandslt-wasm; MSRV 1.81 β 1.88 (let-chains, stabilized 1.88). CI MSRV gate updated.indexmapdirect dependency removed β it was an MSRV-pin with zerosrc/usage. Resolved dep tree: 13 β 10 (no-default-features), 28 β 25 (default) vs 68 for ratatui + crossterm.unicode-segmentationupper bound dropped.[workspace.lints]table shared by both crates; lib-only hygiene lints (missing_docs,unreachable_pub, clippyunwrap_used/print_stdout/β¦ family) deliberately stay as lib-target inner attrs so examples/tests aren't flooded.cargo clippy --all-features --all-targets -- -D warningsis clean.core::error::Errorimpls;OnceLock β LazyLockwhere const;#[must_use]on remaining builders; 17 never-public terminal methodspub β pub(crate).doc_cfgannotations β docs.rs now shows which feature each gated API needs.unsafe envfallout:#![forbid(unsafe_code)]stays for every shipping build; two mutex-serialized#[cfg(test)]env helpers carry audited exemptions.Fixed
stdinread behindcrossterm::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 withrecv_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)
LayoutNoderemoves O(nodes Γ depth) per-frame re-measurement on deep trees; output byte-identical (full proptest suite + 2 new invalidation regression tests); newlayout_deep_tree_120x40bench (depth 14).dim_buffer_aroundrewrite 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_dirtyalready makes it near-free;flush/static_200x60β 114 ns) β honest no-op.layout_nested_rows_cols40.2 β 32.2 Β΅s,full_render_120x4038.4 β 36.2 Β΅s,animation/churn_200x60within noise.Docs
COMPETITIVE_ANALYSIS.mdreplaced 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