[package]
name = "stygian-graph"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
documentation = "https://greysquirr3l.github.io/stygian"
description = "High-performance graph-based web scraping engine with AI extraction, multi-modal support, and anti-bot capabilities"
keywords = ["scraping", "web-scraping", "graph", "ai", "extraction"]
categories = ["web-programming", "network-programming", "asynchronous"]
readme = "README.md"

[dependencies]
# Core async runtime
tokio = { workspace = true, features = ["full"] }
tokio-util = { workspace = true }
futures.workspace = true
async-trait.workspace = true

# Concurrency
rayon.workspace = true

# Error handling
thiserror.workspace = true
anyhow.workspace = true

# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
toml.workspace = true

# HTTP client
reqwest = { workspace = true, features = ["rustls", "json", "query", "cookies", "gzip", "brotli"] }

# WebSocket client
tokio-tungstenite.workspace = true

# HTML parsing
scraper.workspace = true

# Graph algorithms
petgraph.workspace = true

# Logging & tracing
tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "json"] }

# Utilities
ulid.workspace = true
parking_lot.workspace = true
dashmap.workspace = true
lru.workspace = true
base64.workspace = true
figment.workspace = true
clap.workspace = true
indicatif.workspace = true
prometheus-client.workspace = true

# API server
axum.workspace = true
tower-http.workspace = true
uuid.workspace = true

# Cryptography (webhook signature verification)
hmac.workspace = true
sha2.workspace = true

# Output formats
csv.workspace = true

# Feed parsing (RSS/Atom)
feed-rs.workspace = true

# XML parsing
quick-xml.workspace = true

# Compression
flate2.workspace = true

# OpenAPI spec parsing (always included — pure Rust)
openapiv3.workspace = true
serde_yaml.workspace = true

# IndexMap (matching openapiv3's version)
indexmap.workspace = true

# Browser automation (optional)
stygian-browser = { path = "../stygian-browser", version = "0.8", optional = true }

# WASM plugins (optional)
wasmtime = { workspace = true, optional = true }

# Database (optional)
sqlx = { workspace = true, optional = true }

# Redis / Valkey (optional)
redis = { workspace = true, optional = true }
deadpool-redis = { workspace = true, optional = true }

# S3-compatible object storage (optional)
rust-s3 = { workspace = true, optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "macros"] }
tokio-test = "0.4"
tower = { version = "0.5", features = ["util"] }
proptest.workspace = true
mockall.workspace = true
tempfile = "3"
criterion.workspace = true

[[bench]]
name = "pipeline_bench"
harness = false

[features]
default = ["browser"]
# Include browser automation support
browser = ["dep:stygian-browser"]
# Full feature set
full = ["browser", "api", "wasm-plugins", "postgres", "cloudflare-crawl", "redis", "object-storage"]
# Redis / Valkey cache adapter
redis = ["dep:redis", "dep:deadpool-redis"]
# S3-compatible object storage adapter
object-storage = ["dep:rust-s3"]
# REST API server
api = []
# WASM plugin system (requires wasmtime — significant compile time)
wasm-plugins = ["dep:wasmtime"]
# PostgreSQL storage adapter
postgres = ["dep:sqlx"]
# Cloudflare Browser Rendering crawl adapter
cloudflare-crawl = []
# Default tiered escalation policy adapter
escalation = []
# MCP (Model Context Protocol) server — exposes scraping & pipeline tools over stdin/stdout JSON-RPC 2.0
mcp = []

[[bin]]
name = "stygian"
path = "src/bin/stygian.rs"
required-features = []

[[bin]]
name = "stygian-api"
path = "src/bin/stygian-api.rs"
required-features = []
