rstructor 0.5.1

Get structured, validated data out of LLMs as native Rust structs and enums. Derive a type and rstructor generates the JSON Schema, prompts the model, parses the reply, and retries on validation errors — across OpenAI, Anthropic Claude, Google Gemini, and xAI Grok. The Rust answer to Python's Pydantic + Instructor.
Documentation

rstructor

There is currently very little information to present on this page because Docs.rs has only limited support for extracting structured feature metadata from Cargo crates. This issue is tracked in Rust RFC #3416. Check this library's main docs, readme, and Cargo.toml in case its authors have documentation for features available there instead.

This version has 18 feature flags, 10 of them enabled by default.

default

anthropic (default)

derive (default)

gemini (default)

grok (default)

logging (default)

openai (default)

rstructor_derive (default)

tracing-futures (default)

tracing-subscriber (default)

async-stream

base64

futures-util

mock

reqwest

schemars

streaming

tokio

tools