1 | [package]
|
2 | name = "crossterm"
|
3 | version = "0.27.0"
|
4 | authors = ["T. Post" ]
|
5 | description = "A crossplatform terminal library for manipulating terminals."
|
6 | repository = "https://github.com/crossterm-rs/crossterm"
|
7 | documentation = "https://docs.rs/crossterm/"
|
8 | license = "MIT"
|
9 | keywords = ["event" , "color" , "cli" , "input" , "terminal" ]
|
10 | exclude = ["target" , "Cargo.lock" ]
|
11 | readme = "README.md"
|
12 | edition = "2021"
|
13 | rust-version = "1.58.0"
|
14 | categories = ["command-line-interface" , "command-line-utilities" ]
|
15 |
|
16 | [lib]
|
17 | name = "crossterm"
|
18 | path = "src/lib.rs"
|
19 |
|
20 | #
|
21 | # Build documentation with all features -> EventStream is available
|
22 | #
|
23 | [package.metadata.docs.rs]
|
24 | all-features = true
|
25 |
|
26 | #
|
27 | # Features
|
28 | #
|
29 | [features]
|
30 | default = ["bracketed-paste" , "windows" , "events" ]
|
31 | windows = ["dep:winapi" , "dep:crossterm_winapi" ] # Disables winapi dependencies from being included into the binary (SHOULD NOT be disabled on windows).
|
32 | bracketed-paste = [] # Enables triggering a `Event::Paste` when pasting text into the terminal.
|
33 | event-stream = ["dep:futures-core" , "events" ] # Enables async events
|
34 | use-dev-tty = ["filedescriptor" ] # Enables raw file descriptor polling / selecting instead of mio.
|
35 | events = ["dep:mio" , "dep:signal-hook" , "dep:signal-hook-mio" ] # Enables reading input/events from the system.
|
36 | serde = ["dep:serde" , "bitflags/serde" ] # Enables 'serde' for various types.
|
37 |
|
38 | #
|
39 | # Shared dependencies
|
40 | #
|
41 | [dependencies]
|
42 | bitflags = {version = "2.3" }
|
43 | parking_lot = "0.12"
|
44 |
|
45 | # optional deps only added when requested
|
46 | futures-core = { version = "0.3" , optional = true, default-features = false }
|
47 | serde = { version = "1.0" , features = ["derive" ], optional = true }
|
48 |
|
49 | #
|
50 | # Windows dependencies
|
51 | #
|
52 | [target.'cfg(windows)'.dependencies.winapi]
|
53 | version = "0.3.9"
|
54 | features = ["winuser" , "winerror" ]
|
55 | optional = true
|
56 |
|
57 | [target.'cfg(windows)'.dependencies]
|
58 | crossterm_winapi = { version = "0.9.1" , optional = true }
|
59 |
|
60 | #
|
61 | # UNIX dependencies
|
62 | #
|
63 | [target.'cfg(unix)'.dependencies]
|
64 | libc = "0.2"
|
65 | signal-hook = { version = "0.3.17" , optional = true }
|
66 | filedescriptor = { version = "0.8" , optional = true }
|
67 | mio = { version = "0.8" , features = ["os-poll" ], optional = true }
|
68 | signal-hook-mio = { version = "0.2.3" , features = ["support-v0_8" ], optional = true }
|
69 |
|
70 | #
|
71 | # Dev dependencies (examples, ...)
|
72 | #
|
73 | [dev-dependencies]
|
74 | tokio = { version = "1.25" , features = ["full" ] }
|
75 | futures = "0.3"
|
76 | futures-timer = "3.0"
|
77 | async-std = "1.12"
|
78 | serde_json = "1.0"
|
79 | serial_test = "2.0.0"
|
80 |
|
81 | #
|
82 | # Examples
|
83 | #
|
84 | [[example]]
|
85 | name = "event-read"
|
86 | required-features = ["bracketed-paste" , "events" ]
|
87 |
|
88 | [[example]]
|
89 | name = "event-match-modifiers"
|
90 | required-features = ["bracketed-paste" , "events" ]
|
91 |
|
92 | [[example]]
|
93 | name = "event-poll-read"
|
94 | required-features = ["bracketed-paste" , "events" ]
|
95 |
|
96 | [[example]]
|
97 | name = "event-stream-async-std"
|
98 | required-features = ["event-stream" , "events" ]
|
99 |
|
100 | [[example]]
|
101 | name = "event-stream-tokio"
|
102 | required-features = ["event-stream" , "events" ]
|
103 |
|
104 | [[example]]
|
105 | name = "event-read-char-line"
|
106 | required-features = ["events" ]
|
107 |
|
108 | [[example]]
|
109 | name = "stderr"
|
110 | required-features = ["events" ]
|
111 | |