Repository navigation
Default Termios support
AppCUI-rs v0.5.9
This release makes Termios the default backend on Linux and macOS, and makes the NCurses and CrossTerm backends optional cargo features. A default build on Unix no longer needs the ncurses system library, the libc crate or crossterm.
⚠️ Breaking changes
- The default backend on Linux is now Termios (it was NCurses). macOS also uses Termios by default.
- NCurses is now an optional feature.
backend::Type::NcursesTerminalonly exists when theNCURSESfeature is enabled, and it is never chosen by default. To keep using it:appcui = { version = "0.5.9", features = ["NCURSES"] }
This feature also pulls inApp::new().backend(appcui::backend::Type::NcursesTerminal).run()?;
libcand needs the ncurses development library installed (libncursesw, e.g.sudo apt install libncurses-dev). - CrossTerm is no longer pulled in on Unix.
backend::Type::CrossTermrequires theCROSSTERMfeature on every platform. - Termios supports Linux and macOS only. Other Unix systems (FreeBSD, etc.) currently fail to compile with a clear error message.
✨ Termios backend
- No
libcdependency:<termios.h>,poll,read,ioctlandsignalare bound directly, with separate definitions for Linux and macOS and compile-time size checks. - Fixed raw mode on Linux: the backend previously used the macOS
termioslayout, so on Linux the terminal stayed in line mode with echo on. - Terminal resize is detected and the screen is redrawn at the new size.
- Mouse: SGR mouse reporting, with click, release, drag and move for the left, middle and right buttons.
- Keyboard:
- arrows, Home/End, Page Up/Down, Insert/Delete and F1–F12, with Shift/Alt/Ctrl modifiers (xterm encoding)
- Shift+Tab
- Alt+key sent as an Escape prefix
- Ctrl+letter and other Ctrl combinations
- The terminal is restored on exit, and the cursor is shown again.
🛠 Other changes
- File system roots on Linux: total and free disk space are now read without
libc(64-bit Linux). On macOS, sizes are reported as 0 for now. - Documentation and book updated for the new backend defaults and features, including a new NCurses page.
🐞 Known issues
- Termios: the mouse wheel is not supported yet.
- NCurses: the terminal is not reset when the app exits (
endwin()is not called). Runresetif your shell stops echoing. - Unix clipboard: copy and paste can panic when no X11 or Wayland display is available (e.g. SSH, or WSL without WSLg).
- macOS: the list of file system roots is empty.
🙌 Contributors
Full Changelog: v0.5.8...v0.5.9