@@ -17,91 +17,66 @@ categories = ["command-line-interface", "command-line-utilities"]
17
17
name = " crossterm"
18
18
path = " src/lib.rs"
19
19
20
- #
21
- # Build documentation with all features -> EventStream is available
22
- #
23
20
[package .metadata .docs .rs ]
24
21
all-features = true
25
22
26
- #
27
- # Features
28
- #
29
23
[features ]
30
- default = [" bracketed-paste" , " windows" , " events" ]
31
- windows = [
32
- " dep:winapi" ,
33
- " dep:crossterm_winapi" ,
34
- ] # Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows).
35
- bracketed-paste = [
36
- ] # Enables triggering a `Event::Paste` when pasting text into the terminal.
37
- event-stream = [" dep:futures-core" , " events" ] # Enables async events
38
- use-dev-tty = [
39
- " filedescriptor" ,
40
- " rustix/process" ,
41
- ] # Enables raw file descriptor polling / selecting instead of mio.
42
- events = [
43
- " dep:mio" ,
44
- " dep:signal-hook" ,
45
- " dep:signal-hook-mio" ,
46
- ] # Enables reading input/events from the system.
47
- serde = [" dep:serde" , " bitflags/serde" ] # Enables 'serde' for various types.
48
-
49
- #
50
- # Shared dependencies
51
- #
24
+ default = [" bracketed-paste" , " events" , " windows" ]
25
+
26
+ # ! ### Default features
27
+ # # Enables triggering [`Event::Paste`](event::Event::Paste) when pasting text into the terminal.
28
+ bracketed-paste = []
29
+
30
+ # # Enables reading input/events from the system using the [`event`] module.
31
+ events = [" dep:mio" , " dep:signal-hook" , " dep:signal-hook-mio" ]
32
+
33
+ # # Enables windows specific crates.
34
+ windows = [" dep:winapi" , " dep:crossterm_winapi" ]
35
+
36
+ # ! ### Optional Features
37
+
38
+ # # Enables the [EventStream](event::EventStream) struct for async event reading.
39
+ event-stream = [" dep:futures-core" , " events" ]
40
+
41
+ # # Enables [`serde`] for various types.
42
+ serde = [" dep:serde" , " bitflags/serde" ]
43
+
44
+ # # Enables raw file descriptor polling / selecting instead of mio.
45
+ use-dev-tty = [" filedescriptor" , " rustix/process" ]
46
+
52
47
[dependencies ]
53
48
bitflags = { version = " 2.3" }
54
- parking_lot = " 0.12"
55
-
56
- # optional deps only added when requested
49
+ document-features = " 0.2.10"
57
50
futures-core = { version = " 0.3" , optional = true , default-features = false }
51
+ parking_lot = " 0.12"
58
52
serde = { version = " 1.0" , features = [" derive" ], optional = true }
59
53
60
- #
61
54
# Windows dependencies
62
- #
63
- [target .'cfg(windows)' .dependencies .winapi ]
64
- version = " 0.3.9"
65
- features = [" winuser" , " winerror" ]
66
- optional = true
67
-
68
55
[target .'cfg(windows)' .dependencies ]
69
56
crossterm_winapi = { version = " 0.9.1" , optional = true }
57
+ winapi = { version = " 0.3.9" , optional = true , features = [" winuser" , " winerror" ] }
70
58
71
- #
72
59
# UNIX dependencies
73
- #
74
60
[target .'cfg(unix)' .dependencies ]
61
+ filedescriptor = { version = " 0.8" , optional = true }
75
62
# Default to using rustix for UNIX systems, but provide an option to use libc for backwards
76
63
# compatibility.
77
64
libc = { version = " 0.2" , default-features = false , optional = true }
78
- rustix = { version = " 0.38.34" , default-features = false , features = [
79
- " std" ,
80
- " stdio" ,
81
- " termios" ,
82
- ] }
83
- signal-hook = { version = " 0.3.17" , optional = true }
84
- filedescriptor = { version = " 0.8" , optional = true }
85
65
mio = { version = " 1.0" , features = [" os-poll" ], optional = true }
86
- signal-hook-mio = { version = " 0.2.4 " , features = [
87
- " support-v1_0 " ,
88
- ], optional = true }
66
+ rustix = { version = " 0.38.34 " , default- features = false , features = [ " std " , " stdio " , " termios " ] }
67
+ signal-hook = { version = " 0.3.17 " , optional = true }
68
+ signal-hook-mio = { version = " 0.2.4 " , features = [ " support-v1_0 " ], optional = true }
89
69
90
- #
91
- # Dev dependencies (examples, ...)
92
- #
93
70
[dev-dependencies ]
94
- tokio = { version = " 1.25 " , features = [ " full " ] }
71
+ async-std = " 1.12 "
95
72
futures = " 0.3"
96
73
futures-timer = " 3.0"
97
- async-std = " 1.12"
98
74
serde_json = " 1.0"
99
75
serial_test = " 2.0.0"
100
76
temp-env = " 0.3.6"
77
+ tokio = { version = " 1.25" , features = [" full" ] }
101
78
102
- #
103
79
# Examples
104
- #
105
80
[[example ]]
106
81
name = " event-read"
107
82
required-features = [" bracketed-paste" , " events" ]
0 commit comments