[package]
name = "iicp-client"
version = "0.7.5"
edition = "2021"
rust-version = "1.80"
description = "Official Rust client SDK for the IICP protocol (ADR-016)"
license = "Apache-2.0"
keywords = ["iicp", "ai-agents", "protocol", "sdk"]
categories = ["network-programming", "api-bindings"]
repository = "https://github.com/RobLe3/iicp-client-rust"
documentation = "https://docs.rs/iicp-client"
readme = "README.md"

[lib]
name = "iicp_client"
path = "src/lib.rs"

[[example]]
name = "quickstart"
path = "examples/quickstart.rs"

[[example]]
name = "node"
path = "examples/node.rs"

[[bin]]
name = "iicp-node"
path = "src/bin/iicp_node.rs"

[features]
metrics = ["dep:prometheus"]
# Native IICP binary transport (port 9484, spec/iicp-framing.md) — opt-in
# because ciborium adds ~50KB to release binaries; HTTP-only nodes don't need it.
iicp-tcp = ["dep:ciborium"]
# ADR-041 UPnP NAT detection — auto-discover the public endpoint on operator
# networks behind a UPnP-capable router. Opt-in because igd-next pulls in
# SSDP discovery + XML parsing that headless deployments don't need.
nat = ["dep:igd-next"]

[dependencies]
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
regex = "1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "time", "sync", "net", "io-util", "signal", "process"] }
uuid = { version = "1.0", features = ["v4"] }
thiserror = "1.0"
axum = "0.7"
tracing = "0.1"
prometheus = { version = "0.13", optional = true }
ciborium = { version = "0.2", optional = true }
igd-next = { version = "0.17", default-features = false, features = ["aio_tokio"], optional = true }
# ADR-019 pricing-block HMAC-SHA256. Pulled in unconditionally — operators
# who don't use pricing pay only ~30KB in binary size.
hmac = "0.12"
sha2 = "0.10"
subtle = "2"
# Local time-of-day for availability windows (ADR-006). "clock" only — no serde/format.
chrono = { version = "0.4", default-features = false, features = ["clock"] }

[dev-dependencies]
tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "time", "sync"] }
mockito = "1.0"
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
tracing-subscriber = "0.3"
serde_json = "1.0"
hex = "0.4"
hmac = "0.12"
sha2 = "0.10"
