21 releases
Uses new Rust 2024
| 0.1.22 | Feb 13, 2026 |
|---|---|
| 0.1.21 | Feb 11, 2026 |
| 0.1.18 | Jan 22, 2026 |
#147 in Asynchronous
63 downloads per month
1MB
21K
SLoC
claude-code-acp-rs
A Rust implementation of Claude Code ACP Agent. Use Claude Code from any ACP-compatible client such as Zed!
This is an alternative to the official TypeScript implementation (@zed-industries/claude-code-acp).
Installation
From Cargo
# Install the rust toolchain first: https://www.rust-lang.org/tools/install
cargo install claude-code-acp-rs
From Source
git clone https://github.com/soddygo/claude-code-acp-rs.git
cd claude-code-acp-rs
cargo install --path .
With OpenTelemetry Support
To enable distributed tracing with OpenTelemetry:
# Install with otel feature
cargo install claude-code-acp-rs --features otel
# Or from source
cargo install --path . --features otel
Usage
Command Line
# Show help
claude-code-acp-rs --help
# Run with diagnostic mode (logs to file)
claude-code-acp-rs --diagnostic
# Run with verbose logging
claude-code-acp-rs -vv
With Zed Editor
Configure Zed to use this agent by specifying claude-code-acp-rs as the agent command.
Environment Variables
ANTHROPIC_BASE_URL: Custom API base URLANTHROPIC_API_KEY: API key (preferred)ANTHROPIC_AUTH_TOKEN: Authentication token (legacy, fallback)ANTHROPIC_MODEL: Model to use (default: claude-sonnet-4-20250514)ANTHROPIC_SMALL_FAST_MODEL: Model for fast operationsMAX_THINKING_TOKENS: Maximum tokens for extended thinking mode
Configuration Files
The agent can also load configuration from Claude Code settings files. When environment variables are not set, the agent will read from:
~/.claude/settings.json(user settings).claude/settings.json(project settings).claude/settings.local.json(local settings)
Configuration priority (highest to lowest):
- Environment variables
- Settings files - Top-level fields
- Settings files -
envobject - Defaults
Supported settings formats:
Using top-level fields:
{
"model": "claude-opus-4-20250514",
"smallFastModel": "claude-haiku-4-20250514",
"apiBaseUrl": "https://api.anthropic.com"
}
Using env object (compatible with Claude Code CLI):
{
"env": {
"ANTHROPIC_MODEL": "claude-opus-4-20250514",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-20250514",
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
}
}
This allows you to use your existing Claude Code configuration without setting environment variables.
OpenTelemetry Tracing
When compiled with the otel feature, you can enable distributed tracing to debug and monitor the agent:
# Send traces to Jaeger (default OTLP endpoint)
claude-code-acp-rs --otel-endpoint http://localhost:4317
# With custom service name
claude-code-acp-rs --otel-endpoint http://localhost:4317 --otel-service-name my-claude-agent
# Or use environment variable
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 claude-code-acp-rs
Jaeger Quick Start
# Start Jaeger with Docker
docker run -d --name jaeger \
-p 16686:16686 \
-p 4317:4317 \
jaegertracing/jaeger:latest
# Run the agent with tracing
claude-code-acp-rs --otel-endpoint http://localhost:4317
# View traces at http://localhost:16686
Coexistence with npm Version
This Rust implementation uses the command name claude-code-acp-rs to avoid conflicts with the npm package @zed-industries/claude-code-acp (which uses claude-code-acp).
Both versions can be installed and used on the same system:
claude-code-acp→ npm version (TypeScript)claude-code-acp-rs→ Rust version (this project)
Extended Thinking Mode
This agent supports Claude's Extended Thinking mode for complex reasoning tasks. See the Thinking Mode Guide for details.
Quick Start:
# Enable thinking mode with environment variable
export MAX_THINKING_TOKENS=4096
export ANTHROPIC_MODEL="claude-sonnet-4-20250514"
# Run the agent
claude-code-acp-rs
Features:
- 🧠 Deep reasoning for complex programming tasks
- 🔍 Better code analysis and generation quality
- 📊 Configurable thinking token budget (4096, 8000, 16000)
- 🎯 Support via environment variables or ACP
_metafield
For more details, see:
License
Contribution
Dependencies
~24–44MB
~595K SLoC