[package]
name = "romm-cli"
version = "0.35.0"
edition = "2021"
description = "Rust-based CLI and TUI for the ROMM API"
repository = "https://github.com/patricksmill/romm-cli"
license = "MIT"
keywords = ["romm", "terminal", "tui", "emulator", "games"]
categories = ["command-line-utilities", "emulators"]
readme = "README.md"

[dependencies]
# default-features = false avoids native-tls/openssl-sys (breaks aarch64-linux cross-builds in CI).
reqwest = { version = "0.13", default-features = false, features = ["json", "multipart", "query", "rustls", "http2"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
clap = { version = "4.5", features = ["derive"] }
anyhow = "1.0"
tokio = { version = "1.37", features = ["macros", "rt-multi-thread", "fs", "io-util", "time", "signal"] }
base64 = "0.22"
sha2 = "0.11"
percent-encoding = "2.3"
dirs = "6.0"
dialoguer = { version = "0.12", default-features = false, features = ["password"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
indicatif = "0.18.4"
keyring = "4.0.1"
keyring-core = "1.0.0"
self_update = { version = "0.44.0", default-features = false, features = [
    "reqwest",
    "rustls", 
    "archive-zip", 
    "archive-tar", 
    "compression-flate2",
    "compression-zip-deflate"
] }

# TUI Optional Dependencies
ratatui = { version = "0.30", optional = true }
crossterm = { version = "0.29", optional = true }
unicode-normalization = { version = "0.1", optional = true }
ratatui-image = { version = "11.0.2", optional = true, default-features = false, features = ["crossterm", "image-defaults"] }
image = { version = "0.25.10", optional = true }
zip = "8.5.1"
md5 = "0.8"
time = { version = "0.3", features = ["formatting"] }

[features]
default = ["tui"]
tui = [
    "dep:ratatui",
    "dep:crossterm",
    "dep:unicode-normalization",
    "dep:ratatui-image",
    "dep:image",
]

[[bin]]
name = "romm-cli"
path = "src/main.rs"

[[bin]]
name = "romm-tui"
path = "src/bin/romm_tui.rs"
required-features = ["tui"]

[[bin]]
name = "romm-openapi-gen"
path = "tools/openapi_gen.rs"

[dev-dependencies]
assert_cmd = "2.0"
httpmock = "0.7"
predicates = "3.1"
wiremock = "0.6.5"

