Production Rust SDK

TurboClaude

Comprehensive Rust SDK for Anthropic Claude API with streaming, tool use, prompt caching, batch processing, and multi-provider support. Type-safe async-first design with zero-cost abstractions.

172
Tests
8
Crates
4+
Providers
v0.1.0
Current Version

Complete Claude API Coverage

Type-safe integration with every Claude capability, built for production systems.

Messages API

Sync/async messages with streaming support

Tool Use

Automatic execution loops with typed parameters

Prompt Caching

Cost optimization with cache control

Batch Processing

Large-scale async batch operations

Token Counting

Accurate token usage estimation

Multi-Provider

Anthropic, AWS Bedrock, Google Vertex AI

Modular Workspace Architecture

8 specialized crates for flexible, composable AI integrations.

turboclaude

Main client library

turboclaude-protocol

Shared types & serialization

turboclaude-transport

HTTP/subprocess abstraction

turboclaude-core

Base traits & types

turboclaudeagent

Agent framework with hooks

turboclaude-skills

Dynamic skill system

turboclaude-mcp

MCP adapter layer

integration-tests

132 integration tests

Enterprise-Grade Features

Async-First Design

Tokio-powered async runtime with optional blocking wrapper for compatibility

Type-Safe Builders

Compile-time validated configuration with zero runtime overhead

Three Response Modes

Standard, raw (with headers/metadata), and streaming via futures::Stream

Tower Middleware Stack

Extensible request/response processing with automatic retries and rate limiting

Lazy Initialization

Resources initialized only when needed, reducing startup overhead

Zero-Cost Abstractions

Performance matching hand-written C with elegant, safe Rust semantics

Get Started with TurboClaude

Add to your Cargo.toml:

turboclaude = "0.1"

Basic usage:

use turboclaude::Claude;

#[tokio::main]
async fn main() {
  let claude = Claude::new("YOUR_API_KEY");

  let response = claude
    .message()
    .model("claude-3-5-sonnet")
    .messages(vec![/* ... */])
    .send()
    .await?;

  println!("{}", response.content);
}

See the GitHub repository for comprehensive examples and documentation.

Build Production Claude Applications in Rust

Type-safe, performant Claude API integration with comprehensive feature coverage.

Explore on GitHub