Repository navigation
Add bounded EPUB reading with local terminal I/O - #109
Merged
Merged
Conversation
Project EPUB 2 and EPUB 3 linear spines into bounded UTF-8 text, then add book layout and section navigation. Replace the Crossterm maintenance fork with a small in-tree Unix adapter for raw mode, bounded input parsing, ANSI output, resize handling, and reliable terminal restoration.
Run the RustSec audit for pull requests, main-branch pushes, and explicit manual requests only. Add a documentation contract test so recurring workflow triggers are not reintroduced accidentally.
Use the standard integer multiple check when rounding sub-millisecond poll durations. This keeps the Linux implementation warning-free on Rust 1.97 while remaining compatible with Rust 1.88.
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.
Summary
Why
TUT is meant to stay focused and lightweight. The former Crossterm fork carried terminal behavior that was specific to this project. The new adapter implements only the raw mode, keyboard input, resize, ANSI output, and restoration behavior that TUT needs.
The locked dependency graph drops from 99 packages to 84 packages, even after adding EPUB support.
Safety and limits
EPUB input keeps explicit limits for archive size, entry count, expanded data, linear-spine data, projected text, XML depth, metadata, and section indexes. Terminal input is bounded to 64 KiB per incomplete sequence and incomplete sequences time out.
The reader does not execute scripts or fetch remote resources. It ignores CSS layout, fixed-layout pages, embedded fonts, bitmap rendering, DRM, and link activation.
Validation