ioctl-term-light

Crates.ioioctl-term-light
lib.rsioctl-term-light
version0.2.0
created_at2025-07-21 21:36:46.684491+00
updated_at2025-07-23 23:32:02.919779+00
descriptionLightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns.
homepagehttps://github.com/gabrielfalcao/utf8-rune
repository
max_upload_size
id1762706
size20,324
Gabriel Falcão (gabrielfalcao)

documentation

https://docs.rs/ioctl-term-light

README

ioctl-term-light

Lightweight crate to retrieve the dimensions (.i.e.: width/height) of a UNIX terminal in terms of rows/columns.

Examples

use ioctl_term_light::{cols, rows};

assert_eq!(cols(), 130)
assert_eq!(rows(), 33)
use ioctl_term_light::{tuple_from_raw_fd, Stdout};

assert_eq!(tuple_from_raw_fd(Stdout), (130, 33));

Crate Features

fd

Enables the FileDescriptor enum.

any-fd

Enables the Any(i32) variant in the FileDescriptor enum.

stdio

Enables the modules:

stderr

Enables the module ioctl_term_light::stderr.

stdin

Enables the module ioctl_term_light::stdin.

stdout

Enables the module ioctl_term_light::stdout.

u8

Enables conversion from u16 to u8 within the dimensions module

Commit count: 0

cargo fmt