xai-rust 0.1.1

Rust SDK for the xAI API (Grok models)
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.93"
name = "xai-rust"
version = "0.1.1"
build = false
exclude = [
    ".venv/",
    "ci/",
    "external/",
    "legacy/",
    "AGENTS/",
    "output/",
    ".github/",
    ".ci/",
    ".ci-tools/",
    ".githooks/",
    ".agent-state/",
    ".agent-logs/",
    ".agent-worktrees/",
    ".AGENTS/",
    "AGENTS.md",
    "DENY.toml",
    "deny.toml",
    ".nextest.toml",
    "coverage.json",
    "coverage-summary.json",
    "lcov-full.info",
    "lcov.info",
    "uv.lock",
    "pyproject.toml",
    "security/",
    "scripts/",
    ".cargo/",
    "CLAUDE.md",
    "Makefile.toml",
    "spec.md",
    "feature-flag-truth-matrix.md",
    "regen-send-to-llm.ps1",
    "Cargo.toml.tmp",
    "Cargo.toml.orig",
    ".cargo_vcs_info.json",
    ".gitignore",
    "Cargo.lock",
    "TELEMETRY-EVIDENCE.md",
    "PARITY-SCORECARD.md",
    "RELEASE-CHECKLIST.md",
    "PIPELINE-SUMMARY.md",
    "EXECUTION-PLAN.md",
    "MASTER-CHECKLIST.md",
    "src/xai_rust.egg-info/",
    "tests/__pycache__/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for the xAI API (Grok models)"
homepage = "https://github.com/cpjet64/xai-rust"
documentation = "https://docs.rs/xai-rust"
readme = "README.md"
keywords = [
    "xai",
    "grok",
    "ai",
    "llm",
    "api",
]
categories = [
    "api-bindings",
    "asynchronous",
]
license = "MIT"
repository = "https://github.com/cpjet64/xai-rust"

[features]
default = [
    "realtime",
    "files",
]
files = [
    "dep:mime_guess",
    "reqwest/multipart",
]
opt-bench-internals = []
realtime = [
    "dep:tokio-tungstenite",
    "dep:http",
]
telemetry = ["dep:tracing"]

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

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

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

[[example]]
name = "file_upload"
path = "examples/file_upload.rs"
required-features = ["files"]

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

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

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

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

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

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

[[example]]
name = "voice_agent"
path = "examples/voice_agent.rs"
required-features = ["realtime"]

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

[[test]]
name = "serde_roundtrips"
path = "tests/serde_roundtrips.rs"

[[bench]]
name = "response_encode_path"
path = "benches/response_encode_path.rs"
harness = false

[[bench]]
name = "response_stream"
path = "benches/response_stream.rs"
harness = false

[[bench]]
name = "responses_semantics"
path = "benches/responses_semantics.rs"
harness = false

[dependencies.base64]
version = "0.22"

[dependencies.bytes]
version = "1"

[dependencies.futures-util]
version = "0.3"

[dependencies.http]
version = "1"
optional = true

[dependencies.httpdate]
version = "1"

[dependencies.mime_guess]
version = "2"
optional = true

[dependencies.pin-project-lite]
version = "0.2"

[dependencies.reqwest]
version = "0.13"
features = [
    "json",
    "stream",
    "rustls",
]
default-features = false

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "time",
    "rt-multi-thread",
]

[dependencies.tokio-tungstenite]
version = "0.28"
features = ["rustls-tls-webpki-roots"]
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.url]
version = "2"

[dev-dependencies.criterion]
version = "0.5"

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.tokio]
version = "1"
features = [
    "full",
    "test-util",
]

[dev-dependencies.wiremock]
version = "0.6"