[package]
name = "rstructor"
version = "0.2.11"
edition = "2024"
description = "Rust equivalent of Python's Instructor + Pydantic: Extract structured, validated data from LLMs (OpenAI, Anthropic, Grok, Gemini) using type-safe Rust structs and enums"
license = "MIT"
repository = "https://github.com/clifton/rstructor"
authors = ["Clifton King <cliftonk@gmail.com>"]
readme = "README.md"
documentation = "https://docs.rs/rstructor"
exclude = [
  # Release and development scripts
  "release.sh",
  "*.sh",
  # Documentation that shouldn't be in the crate
  "CLAUDE.md",
  "EXAMPLES.md",
  # GitHub workflows
  ".github/",
  # CI/CD configs
  ".gitignore",
  ".gitattributes",
  # Claude/LLM generated or temporary files
  ".claude/",
  # Temporary files directory (ad-hoc scripts, temporary markdown, etc.)
  "tmp/",
  # Backup files from sed/editors
  "*.orig",
  "*.bak",
]
keywords = ["pydantic", "instructor", "structured-output", "llm", "openai"]
categories = [
  "api-bindings",
  "web-programming",
  "parsing",
  "data-structures",
  "text-processing",
]

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
async-trait = "0.1.89"
tokio = { version = "1.52.1", features = [
  "rt",
  "macros",
  "rt-multi-thread",
  "io-std",
], optional = true }
reqwest = { version = "0.13.3", features = [
  "json",
  "query",
  "default-tls",
], default-features = false, optional = true }
thiserror = "2.0.18"
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = [
  "env-filter",
], optional = true }
tracing-futures = { version = "0.2.5", optional = true }
rstructor_derive = { version = "0.2.11", path = "./rstructor_derive", optional = true }
chrono = "0.4.44" # For date/time validation in examples
base64 = "0.22.1"

# Feature flags
[features]
default = ["openai", "anthropic", "grok", "gemini", "derive", "logging"]
openai = ["reqwest", "tokio"]
anthropic = ["reqwest", "tokio"]
grok = ["reqwest", "tokio"]
gemini = ["reqwest", "tokio"]
derive = ["rstructor_derive"]
logging = ["tracing-subscriber", "tracing-futures"]

[workspace]
members = ["rstructor_derive"]
