Cargo Features

crossterm = { version = "0.27.0", default-features = false, features = ["windows", "bracketed-paste", "event-stream", "use-dev-tty", "events", "serde"] }


default = bracketed-paste, events, windows

These default features are set whenever crossterm is added without default-features = false somewhere in the dependency tree.

windows default

Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows).

Enables crossterm_winapi and winapi

bracketed-paste default

Enables triggering a Event::Paste when pasting text into the terminal.

Affects event::EnableBracketedPaste, event::DisableBracketedPaste

event-stream = events

Enables async events

Enables futures-core

optional deps only added when requested

use-dev-tty = filedescriptor

Enables raw file descriptor polling / selecting instead of mio.

events default event-stream?

Enables reading input/events from the system.

Enables mio, signal-hook, and signal-hook-mio

Affects event::EnableMouseCapture, crossterm::event, unix::supports_keyboard_enhancement, windows::supports_keyboard_enhancement


Enables 'serde' for various types.

Enables serde of bitflags, serde

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

Shared dependencies

filedescriptor cfg(unix) use-dev-tty?