mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-05-05 15:32:57 +00:00
Many terminal emulators support copying text to clipboard using ANSI OSC Ps; PT ST with Ps = 5 2, see https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands This enables copying even through SSH and terminal multiplexers. Co-authored-by: Naseschwarz <naseschwarz@0x53a.de>
123 lines
3.6 KiB
TOML
123 lines
3.6 KiB
TOML
[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", "derive-more"]
|
|
|
|
#! ### 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"]
|
|
|
|
## Enables `is_*` helper functions for event enums.
|
|
derive-more = ["dep:derive_more"]
|
|
|
|
## Enables interacting with a host clipboard via [`clipboard`](clipboard/index.html)
|
|
osc52 = ["dep:base64"]
|
|
|
|
[dependencies]
|
|
base64 = { version = "0.22", optional = true }
|
|
bitflags = { version = "2.3" }
|
|
derive_more = { version = "1.0.0", features = ["is_variant"], optional = true }
|
|
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 = "1", 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"]
|
|
|
|
[[example]]
|
|
name = "copy-to-clipboard"
|
|
required-features = ["osc52"]
|