[package]
name = "rstructor"
version = "0.2.2"
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.sh",
"*.sh",
"CLAUDE.md",
"EXAMPLES.md",
".github/",
".gitignore",
".gitattributes",
".claude/",
"tmp/",
"*.orig",
"*.bak",
]
keywords = ["pydantic", "instructor", "structured-output", "llm", "openai"]
categories = [
"api-bindings",
"web-programming",
"parsing",
"data-structures",
"text-processing",
]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
async-trait = "0.1"
tokio = { version = "1.0", features = [
"rt",
"macros",
"rt-multi-thread",
"io-std",
], optional = true }
reqwest = { version = "0.12.15", features = ["json"], optional = true }
thiserror = "2.0.12"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [
"env-filter",
], optional = true }
tracing-futures = { version = "0.2", optional = true }
rstructor_derive = { version = "0.1.28", path = "./rstructor_derive", optional = true }
chrono = "0.4"
[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"]