lotabout / tuikit

Tool kit for writing TUI applications in Rust.
MIT License
104 stars 28 forks source link

Windows support for tuikit? #13

Closed bgianfo closed 4 years ago

bgianfo commented 5 years ago

Is here any chance of adding windows support to tuikit? It seems to use a bunch of UNIX specific functionality?

lotabout commented 4 years ago

Sorry for really late response. Basically tuikit uses the following UNIX specific features:

  1. use fcntl to support non-blocking file read (of user input).
  2. use ioctl to get terminal size.
  3. use sigaction to register handler over terminal resize.

And you could find the related code at sys directory.

Unfortunately I'm not familiar with Windows's API. Sorry that I'll not add the support myself. PRs are welcome though.

prabirshrestha commented 4 years ago

Seems like skim uses tuikit so it also doesn't work in windows.

What about using existing libraries such as termwiz or crossterm that works in pure rust and is cross platform. Both supports non blocking as well as getting terminal size as well as resize events.

TermWiz is also quite interesting as it has first class support for BufferredTerminal as well as Widgets.

Kreijstal commented 2 months ago

Seems like skim uses tuikit so it also doesn't work in windows.

What about using existing libraries such as termwiz or crossterm that works in pure rust and is cross platform. Both supports non blocking as well as getting terminal size as well as resize events.

TermWiz is also quite interesting as it has first class support for BufferredTerminal as well as Widgets.

maybe a wrapper for windows that uses termwiz?