Skip to content

Update crossterm dependency to use use-dev-tty feature - #14

Closed
xtqqczze wants to merge 1 commit into
alejandroqh:mainfrom
xtqqczze:use-dev-tty
Closed

xtqqczze wants to merge 1 commit into
alejandroqh:mainfrom
xtqqczze:use-dev-tty

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze changed the title Update crossterm dependency to use 'use-dev-tty' feature Update crossterm dependency to use use-dev-tty feature Aug 2, 2026
@alejandroqh

Copy link
Copy Markdown
Owner

Hi @xtqqczze, thanks for the PR and for the heads-up about crossterm-rs/crossterm#1101!

I can't merge this as-is, though. filedescriptor and use-dev-tty aren't equivalent: in crossterm 0.29 the filedescriptor feature is a no-op for term39 (no code is gated on it), while use-dev-tty switches the Unix event source from mio to poll/select. That backend has an open bug (crossterm-rs/crossterm#839) where event::poll(Duration::ZERO) never returns buffered events, and term39's event loop relies on a zero-timeout poll to drain events each frame. With this change it processes one event per frame instead of a batch, which I measured as 20 keystrokes taking 20 frames instead of 1. Fast typing and mouse drags would lag noticeably.

Since the goal is just forward compatibility with #1101, the safe change is to drop filedescriptor from the feature list and leave the rest alone. If you'd like to update the PR to that, I'll happily merge it. Otherwise I can do it myself, no problem.

Thanks again!

@xtqqczze

xtqqczze commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Ah I see, I saw use-dev-tty had a dependency on filedescriptor in crossterm, so thought I'd try enabling that. But looks like that's completely unnecessary. I've opened #15 and closed this PR.

@xtqqczze xtqqczze closed this Sep 13, 2026
@xtqqczze
xtqqczze deleted the use-dev-tty branch September 13, 2026 16:54
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