[package]
name = "mijia-spec"
version = "0.2.0"
edition = "2024"
description = "A small Rust library and CLI for Xiaomi MIoT device specification fetching."
readme = "README.md"
license = "MIT"
authors = ["lzyor <lzyor@qq.com>"]
repository = "https://github.com/lzyor/mijia-spec-rs"
homepage = "https://github.com/lzyor/mijia-spec-rs"
documentation = "https://docs.rs/mijia-spec"
keywords = ["miio", "miot", "xiaomi", "iot", "spec"]
categories = ["command-line-utilities", "parsing"]
include = ["src/**", "Cargo.toml", "README.md", "LICENSE"]

[features]
default = ["sync", "ureq-client"]
sync = []
async = []
ureq-client = ["sync", "dep:ureq"]
reqwest-client = ["dep:reqwest"]
cli = ["sync", "dep:clap"]

[dependencies]
ahash = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "2"
ureq = { version = "3", optional = true }
reqwest = { version = "0.13", default-features = false, features = [
  "rustls",
  "blocking",
], optional = true }
clap = { version = "4.6", features = ["derive"], optional = true }

[[bin]]
name = "mijia-spec"
path = "src/main.rs"
required-features = ["cli"]
