forked from crossterm-rs/crossterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
126 lines (109 loc) · 3.02 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[package]
name = "crossterm"
version = "0.27.0"
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.58.0"
categories = ["command-line-interface", "command-line-utilities"]
[lib]
name = "crossterm"
path = "src/lib.rs"
#
# Build documentation with all features -> EventStream is available
#
[package.metadata.docs.rs]
all-features = true
#
# Features
#
[features]
default = ["bracketed-paste", "windows", "events"]
windows = [
"dep:winapi",
"dep:crossterm_winapi",
] # Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows).
bracketed-paste = [
] # Enables triggering a `Event::Paste` when pasting text into the terminal.
event-stream = ["dep:futures-core", "events"] # Enables async events
use-dev-tty = [
"filedescriptor",
] # Enables raw file descriptor polling / selecting instead of mio.
events = [
"dep:mio",
"dep:signal-hook",
"dep:signal-hook-mio",
] # Enables reading input/events from the system.
serde = ["dep:serde", "bitflags/serde"] # Enables 'serde' for various types.
#
# Shared dependencies
#
[dependencies]
bitflags = { version = "2.3" }
parking_lot = "0.12"
# optional deps only added when requested
futures-core = { version = "0.3", optional = true, default-features = false }
serde = { version = "1.0", features = ["derive"], optional = true }
#
# Windows dependencies
#
[target.'cfg(windows)'.dependencies.winapi]
version = "0.3.9"
features = ["winuser", "winerror"]
optional = true
[target.'cfg(windows)'.dependencies]
crossterm_winapi = { version = "0.9.1", optional = true }
#
# UNIX dependencies
#
[target.'cfg(unix)'.dependencies]
libc = "0.2"
signal-hook = { version = "0.3.17", optional = true }
filedescriptor = { version = "0.8", optional = true }
mio = { version = "0.8", features = ["os-poll"], optional = true }
signal-hook-mio = { version = "0.2.3", features = [
"support-v0_8",
], optional = true }
#
# Dev dependencies (examples, ...)
#
[dev-dependencies]
tokio = { version = "1.25", features = ["full"] }
futures = "0.3"
futures-timer = "3.0"
async-std = "1.12"
serde_json = "1.0"
serial_test = "2.0.0"
#
# 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"]