[package]
name = "ras-crawl"
version = "0.1.1"
edition = "2024"
description = "Reusable Rust crawling, extraction, and optional GUI building blocks."
license = "MIT OR Apache-2.0"
repository = "https://radicle.r0r-5chach.xyz/rad:zjmGapZVM54fcD7t1xADFgMsxHh9.git"
readme = "README.md"
keywords = ["crawler", "scraping", "extraction", "openai", "gui"]
exclude = [".todo", ".bash_history"]

[dependencies]
# Crawling & Scraping
reqwest = { version = "0.12.24", default-features = false, features = ["rustls-tls", "json"] }
scraper = { version = "0.24.0", default-features = false }
sitemap = { version = "0.4.1", optional = true }
chromiumoxide = { version = "0.9.1", optional = true }
regex = "1.11.3"
url = { version = "2.5.7", features = ["serde"] }

# AI / LLM
async-openai = { version = "0.35.0", default-features = false, features = ["rustls", "chat-completion", "response-types", "responses"], optional = true }

# Data & Validation
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
ciborium = { version = "0.2.2", optional = true }
csv = "1.4.0"
chrono = { version = "0.4.42", default-features = false, features = ["clock", "std"] }
validator = { version = "0.20.0", features = ["derive"] }

# Async, Errors & Logging
tokio = { version = "1.48.0", features = ["rt-multi-thread", "time", "sync", "macros"] }
futures = { version = "0.3", default-features = false, features = ["std"] }
async-recursion = "1.1.1"
thiserror = "2.0.17"
log = "0.4.28"

# GUI (optional — enable with feature "gui")
eframe = { version = "0.34.1", default-features = false, features = ["default_fonts", "glow", "wayland", "x11"], optional = true }
egui = { version = "0.34.1", optional = true }
rfd = { version = "0.17.2", optional = true }
dirs = { version = "6.0.0", optional = true }
simplelog = { version = "0.12.2", optional = true }
tokio-util = { version = "0.7.18", optional = true }
schemars = { version = "1.2.1", features = ["derive"] }

[features]
default = [
    "checkpoints",
    "url-filtering",
    "url-priority",
    "query-helpers",
    "sitemap",
]
checkpoints = ["dep:ciborium"]
url-filtering = []
url-priority = []
query-helpers = []
sitemap = ["dep:sitemap"]
headless = ["dep:chromiumoxide"]
gui = ["dep:eframe", "dep:egui", "dep:rfd", "dep:dirs", "dep:simplelog", "dep:tokio-util", "checkpoints"]
openai = ["dep:async-openai"]
