Skip to content

v0.1.0 — the production-grade Rust SDK for Claude

Choose a tag to compare

@singhpratech singhpratech released this 16 Jul 22:09

The first release of crimson-crab: the definitive Rust client for Anthropic's Claude API.

Everything the Claude API can do, in idiomatic Rust:

  • Full Messages API: create, streaming (hand-rolled SSE with final-message accumulation), token counting
  • Tool use with response-to-request conversion for agent loops
  • Extended/adaptive thinking, prompt caching, structured outputs
  • Message Batches: create / poll / cancel / stream JSONL results
  • Models API with runtime capability discovery

Engineering guarantees:

  • 191 tests, zero warnings, compile-enforced panic-free library code
  • Forward-compatible wire types: unknown content blocks, events, and future models (Fable/Mythos class included) work day one
  • Tokio-free public API; compiles to wasm32-unknown-unknown
  • Retries matching official SDK policy, hostile-input hardened (capped retry-after, bounded allocations)
  • Streaming is never truncated by total-request timeouts (idle-timeout design)

📖 Docs: https://docs.rs/crimson-crab · 🌐 Site: https://singhpratech.github.io/crimson-crab/

cargo add crimson-crab