[package]
name = "radion-sdk"
version = "0.3.0"
edition = "2024"
rust-version = "1.85"
description = "Official, async-first, fully-typed Rust SDK for the Radion platform"
license = "MIT"
repository = "https://github.com/radion-app/radion-rust"
homepage = "https://radion.app"
documentation = "https://docs.rs/radion-sdk"
readme = "README.md"
keywords = ["radion", "websocket", "realtime", "prediction-markets", "polymarket"]
categories = ["api-bindings", "asynchronous", "web-programming::websocket"]

[features]
default = ["realtime", "rustls"]
# The realtime (WebSocket) product surface. Pulls in the async transport.
realtime = ["dep:tokio", "dep:tokio-tungstenite", "dep:tokio-stream", "dep:futures-util"]
# TLS backends for the realtime transport. Pick exactly one.
rustls = ["tokio-tungstenite?/rustls-tls-webpki-roots"]
native-tls = ["tokio-tungstenite?/native-tls"]
# Emit `tracing` spans/events from the realtime client. Off by default.
tracing = ["dep:tracing"]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
anyhow = "1"
tokio = { version = "1", default-features = false, features = [
  "rt",
  "macros",
  "sync",
  "time",
], optional = true }
tokio-tungstenite = { version = "0.29", default-features = false, features = [
  "connect",
  "handshake",
], optional = true }
tokio-stream = { version = "0.1", features = ["sync"], optional = true }
futures-util = { version = "0.3", default-features = false, features = [
  "sink",
  "std",
], optional = true }
tracing = { version = "0.1", optional = true }

[dev-dependencies]
anyhow = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[[example]]
name = "quickstart"
required-features = ["realtime"]

[[example]]
name = "filters"
required-features = ["realtime"]

[[example]]
name = "lifecycle"
required-features = ["realtime"]
