[package]
name = "browsing"
version = "0.1.4"
edition = "2024"
authors = ["Ying Kit WONG"]
license = "Apache-2.0"
repository = "https://github.com/yingkitw/browsing"
description = "Lightweight MCP/API for browser automation: navigate, get content (text), screenshot. Parallelism via RwLock."
keywords = ["ai", "agents", "web-browsing", "automation", "mcp"]
documentation = "https://docs.rs/browsing"
homepage = "https://github.com/yingkitw/browsing"

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

[[bin]]
name = "browsing"
path = "src/bin/cli.rs"

[[bin]]
name = "browsing-mcp"
path = "src/bin/mcp_server/main.rs"

[dependencies]
# CLI (bin only)
clap = { version = "4.5", features = ["derive", "env", "color"] }
# Async runtime
tokio = { version = "1.40", features = ["rt-multi-thread", "net", "process", "sync", "fs", "time", "io-util", "signal", "macros"] }
async-trait = "0.1"
futures-util = "0.3"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyrepair = "0.2"

# HTTP client (CDP endpoint checks)
reqwest = { version = "0.12", features = ["json"] }

# Error handling
anyhow = "1.0"
thiserror = "1.0"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

# Configuration
dotenv = "0.15"

# Utilities
uuid = { version = "1.10", features = ["v7", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
regex = "1.11"
url = "2.5"
urlencoding = "2.1"
base64 = "0.22"

# MCP (concise, lightweight browser API)
rmcp = { version = "0.14", features = ["server", "transport-io", "schemars"] }
schemars = "1.0"

# CDP client (WebSocket for CDP communication)
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }

[dev-dependencies]
tempfile = "3.8"

[lints.rust]
unsafe_code = "warn"
missing_docs = "warn"

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

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

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

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

