Skip to content

Use io-console for Windows console support - #917

Draft
nobu wants to merge 2 commits into
masterfrom
windows-console-support
Draft

Use io-console for Windows console support#917
nobu wants to merge 2 commits into
masterfrom
windows-console-support

Conversation

@nobu

@nobu nobu commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

  • replace Reline's direct Windows Fiddle bindings with io-console APIs
  • use IO#console_input_events for interruptible input event processing
  • use io-console for TTY detection, console modes, cursor operations, screen updates, and key state checks
  • remove the Windows-only fiddle development dependency
  • add coverage for translating io-console key event hashes into Reline::KeyEventRecord

Motivation

Reline currently carries its own Win32 API bindings and input record parsing. Moving those responsibilities to io-console removes duplicated platform code, gives CRuby and JRuby the same Windows console path, and lets console input waits remain responsive to Ruby interrupts.

This PR depends on ruby/io-console#140. The Gemfile temporarily points at its development branch so this PR can test the integration before the required io-console version is released.

Validation

  • Add Windows console support io-console#140 passes its complete GitHub Actions matrix on Windows, macOS, Linux, JRuby, and TruffleRuby
  • the focused local Reline test could not start because the local Bundler cache had not checked out the Git-based io-console dependency; this PR's CI will install that dependency and exercise the integration

Remove Fiddle bindings by using `io-console` for Windows input and
screen operations.
@nobu
nobu force-pushed the windows-console-support branch 12 times, most recently from 4713478 to 6460d7c Compare August 4, 2026 06:41
Use the Windows console API branch before raising the released
`io-console` dependency.
@nobu
nobu force-pushed the windows-console-support branch from 6460d7c to a4489e0 Compare August 4, 2026 06:44
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