Registry / utility / termios

termios

JSON →
library0.3.3rscratesunverified

Safe bindings for the termios library for terminal I/O control.

# Cargo.toml [dependencies] termios = "0.3.3"
INSTALL
IMPORT
SIG · TERMIOS
T
termios
utilityrustv0.3.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Termios
use termios::Termios;

Disables echo on stdin using termios.

use termios::{Termios, tcgetattr, tcsetattr, TCSANOW}; use std::io; fn main() -> io::Result<()> { let stdin = 0; let mut term = Termios::from_fd(stdin)?; tcgetattr(stdin, &mut term)?; term.c_lflag &= !termios::ECHO; tcsetattr(stdin, TCSANOW, &term)?; Ok(()) }
Debug
Known issues
gotchaOnly works on Unix-like systems (Linux, macOS).
fix
Use conditional compilation or alternative crate for Windows.
affects: >=0.3.0
Upgrade
Version history
0.3.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
termios — cargo add termios · libregistry