Implemented feature flags to make dependencies optional: - clipboard feature: controls arboard dependency - url-open feature: controls open dependency - Both enabled by default for backward compatibility Changes: - Cargo.toml: Added [features] section with optional deps - src/input/main_input.rs: Conditional compilation for open::that() and copy_to_clipboard() - tests/copy.rs: Clipboard tests only compile with feature enabled - Graceful degradation: user-friendly error messages when features disabled Benefits: - Smaller binary size when features disabled - Modular functionality - Better platform compatibility Progress: Priority 5: 1/3 tasks, Total: 17/20 (85%) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
38 lines
978 B
TOML
38 lines
978 B
TOML
[package]
|
|
name = "tele-tui"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
authors = ["Your Name <your.email@example.com>"]
|
|
description = "Terminal UI for Telegram with Vim-style navigation"
|
|
license = "MIT"
|
|
repository = "https://github.com/your-username/tele-tui"
|
|
keywords = ["telegram", "tui", "terminal", "cli"]
|
|
categories = ["command-line-utilities"]
|
|
|
|
[features]
|
|
default = ["clipboard", "url-open"]
|
|
clipboard = ["dep:arboard"]
|
|
url-open = ["dep:open"]
|
|
|
|
[dependencies]
|
|
ratatui = "0.29"
|
|
crossterm = "0.28"
|
|
tdlib-rs = { version = "1.1", features = ["download-tdlib"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
dotenvy = "0.15"
|
|
chrono = "0.4"
|
|
open = { version = "5.0", optional = true }
|
|
arboard = { version = "3.4", optional = true }
|
|
toml = "0.8"
|
|
dirs = "5.0"
|
|
thiserror = "1.0"
|
|
|
|
[dev-dependencies]
|
|
insta = "1.34"
|
|
tokio-test = "0.4"
|
|
|
|
[build-dependencies]
|
|
tdlib-rs = { version = "1.1", features = ["download-tdlib"] }
|