-
Notifications
You must be signed in to change notification settings - Fork 284
/
Cargo.toml
110 lines (88 loc) · 3.17 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[package]
name = "crossterm"
version = "0.28.1"
authors = ["T. Post"]
description = "A crossplatform terminal library for manipulating terminals."
repository = "https://github.com/crossterm-rs/crossterm"
documentation = "https://docs.rs/crossterm/"
license = "MIT"
keywords = ["event", "color", "cli", "input", "terminal"]
exclude = ["target", "Cargo.lock"]
readme = "README.md"
edition = "2021"
rust-version = "1.63.0"
categories = ["command-line-interface", "command-line-utilities"]
[lib]
name = "crossterm"
path = "src/lib.rs"
[package.metadata.docs.rs]
all-features = true
[features]
default = ["bracketed-paste", "events", "windows"]
#! ### Default features
## Enables triggering [`Event::Paste`](event::Event::Paste) when pasting text into the terminal.
bracketed-paste = []
## Enables reading input/events from the system using the [`event`] module.
events = ["dep:mio", "dep:signal-hook", "dep:signal-hook-mio"]
## Enables windows specific crates.
windows = ["dep:winapi", "dep:crossterm_winapi"]
#! ### Optional Features
## Enables the [EventStream](event::EventStream) struct for async event reading.
event-stream = ["dep:futures-core", "events"]
## Enables [`serde`] for various types.
serde = ["dep:serde", "bitflags/serde"]
## Enables raw file descriptor polling / selecting instead of mio.
use-dev-tty = ["filedescriptor", "rustix/process"]
[dependencies]
bitflags = { version = "2.3" }
document-features = "0.2.10"
futures-core = { version = "0.3", optional = true, default-features = false }
parking_lot = "0.12"
serde = { version = "1.0", features = ["derive"], optional = true }
# Windows dependencies
[target.'cfg(windows)'.dependencies]
crossterm_winapi = { version = "0.9.1", optional = true }
winapi = { version = "0.3.9", optional = true, features = ["winuser", "winerror"] }
# UNIX dependencies
[target.'cfg(unix)'.dependencies]
filedescriptor = { version = "0.8", optional = true }
# Default to using rustix for UNIX systems, but provide an option to use libc for backwards
# compatibility.
libc = { version = "0.2", default-features = false, optional = true }
mio = { version = "1.0", features = ["os-poll"], optional = true }
rustix = { version = "0.38.34", default-features = false, features = ["std", "stdio", "termios"] }
signal-hook = { version = "0.3.17", optional = true }
signal-hook-mio = { version = "0.2.4", features = ["support-v1_0"], optional = true }
[dev-dependencies]
async-std = "1.12"
futures = "0.3"
futures-timer = "3.0"
serde_json = "1.0"
serial_test = "2.0.0"
temp-env = "0.3.6"
tokio = { version = "1.25", features = ["full"] }
# Examples
[[example]]
name = "event-read"
required-features = ["bracketed-paste", "events"]
[[example]]
name = "event-match-modifiers"
required-features = ["bracketed-paste", "events"]
[[example]]
name = "event-poll-read"
required-features = ["bracketed-paste", "events"]
[[example]]
name = "event-stream-async-std"
required-features = ["event-stream", "events"]
[[example]]
name = "event-stream-tokio"
required-features = ["event-stream", "events"]
[[example]]
name = "event-read-char-line"
required-features = ["events"]
[[example]]
name = "stderr"
required-features = ["events"]
[[example]]
name = "key-display"
required-features = ["events"]