Skip to content

Commit

Permalink
fix: ensure key-display example requires events feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed May 5, 2024
1 parent 7c67a28 commit e7aefd6
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,28 @@ all-features = true
#
[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.
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.
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" }
bitflags = { version = "2.3" }
parking_lot = "0.12"

# optional deps only added when requested
Expand All @@ -65,7 +75,9 @@ 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 }
signal-hook-mio = { version = "0.2.3", features = [
"support-v0_8",
], optional = true }

#
# Dev dependencies (examples, ...)
Expand Down Expand Up @@ -108,3 +120,7 @@ required-features = ["events"]
[[example]]
name = "stderr"
required-features = ["events"]

[[example]]
name = "key-display"
required-features = ["events"]

0 comments on commit e7aefd6

Please sign in to comment.