Skip to content

Expand StdioProvider with terminal types and nonblocking stdin#757

Open
wdcui wants to merge 1 commit intomainfrom
wdcui/pr3g-stdio-expand
Open

Expand StdioProvider with terminal types and nonblocking stdin#757
wdcui wants to merge 1 commit intomainfrom
wdcui/pr3g-stdio-expand

Conversation

@wdcui
Copy link
Copy Markdown
Member

@wdcui wdcui commented Apr 7, 2026

Summary

  • Add StdioReadError::WouldBlock variant for nonblocking stdin reads.
  • Add StdioIoctlError enum for terminal operation failures.
  • Add platform-agnostic TerminalAttributes and WindowSize structs.
  • Add HostTtyDeviceInfo struct for host terminal device metadata.
  • Expand StdioProvider with methods: get_terminal_attributes, set_terminal_attributes, get_window_size, set_window_size, read_stdin_nonblocking, cancel_stdin_read, host_tty_device_info.
  • Update fs/devices.rs to handle StdioReadError::WouldBlock.

Split from #743.

Add StdioReadError::WouldBlock, StdioIoctlError, TerminalAttributes,
WindowSize, SetTermiosWhen, and HostTtyDeviceInfo types. Add
read_from_stdin_nonblocking, get/set_terminal_attributes,
get/set_window_size, get_terminal_input_bytes, poll_stdin_readable,
cancel_stdin, and host_stdin_tty_device_info methods to StdioProvider
with sensible defaults. Add mock implementations for
get_terminal_input_bytes and poll_stdin_readable. Add test for
nonblocking stdin reads.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

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