Crosstermion is a utility crate to unify some types of both crates, allowing to easily build apps that use the leaner termion
crate on unix systems, but resort to crossterm on windows systems.
Currently provided facilities are:
- a
Keytype an aninput_stream(async) to receive key presses - an
AltenrativeRawTerminalwhich marries an alternative screen with raw mode - a way to create a
tuiortui-reactterminal with either the crossterm or the termion backend.
Features
All features work additively, but in case they are mutually exclusive, for instance
in case of tui-react and tui, or crossterm and termion, the more general one will be chosen.
- mutually exclusive
- crossterm
- provides
Keyconversion support fromcrossbeam::event::KeyEventand anAlternativeRawTerminal - provides a threaded key input channel
- additive
- mutually exclusive
- input-thread
- Adds input handling by spawning a thread providing input via
crossbeamchannels
- Adds input handling by spawning a thread providing input via
- input-thread-flume
- Adds input handling by spawning a thread providing input via
flumechannels
- Adds input handling by spawning a thread providing input via
- input-thread
- input-async
- adds native async capabilites to crossterm, which works without spawning an extra thread thanks to
mio.
- adds native async capabilites to crossterm, which works without spawning an extra thread thanks to
- mutually exclusive
- provides
- termion
- provides
Keyconversion support fromtermion::event::Keyand anAlternativeRawTerminal - provides a threaded key input channel
- additive
- mutually exclusive
- input-thread
- Adds input handling by spawning a thread providing input via
crossbeamchannels
- Adds input handling by spawning a thread providing input via
- input-thread-flume
- Adds input handling by spawning a thread providing input via
flumechannels
- Adds input handling by spawning a thread providing input via
- input-thread
- input-async
- Spawn a thread and provide input events via a futures Stream
- mutually exclusive
- provides
- crossterm
- mutually exclusive
- _using
tui_(mutually exclusive)- tui-termion implies
termionfeature- combines
tuiwithtermionand provides atui::Terminalwithtermionbackend
- combines
- tui-crossterm implies
crosstermfeature- combines
tuiwithcrosstermand provides atui::Terminalwithcrosstermbackend
- combines
- tui-termion implies
- using
tui-react(mutually exclusive)- tui-react-termion implies
termionfeature- combines
tui-reactwithcrosstermand provides atui::Terminalwithcrosstermbackend
- combines
- tui-react-crossterm implies
crosstermfeature- combines
tui-reactwithcrosstermand provides atui::Terminalwithcrosstermbackend
- combines
- tui-react-termion implies
- _using
- flume-async
- activates 'flume/async'
- note that 'flume/select' is always active, as it is just a few lines of code without any additional dependencies