CLAUDE LABJP
FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as OctoberFORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtaskLIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its ownMCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSPLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callbackSONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Articles/API & SDK
API & SDK/2026-04-25Advanced

Claude API × Tauri 2: Building a Production Desktop AI App With Rust — Streaming, Tool Use, and Signed Distribution

A complete guide to shipping a production-grade desktop AI app with Tauri 2 and the Claude API: keychain-backed key storage, an SSE streaming bridge in Rust, Tool Use, and macOS/Windows signed distribution — with code you can copy.

TauriClaude API115RustDesktop AppSSE4Tool Use8Code Signing

Premium Article

Why Tauri 2 — what Electron made hard becomes natural

After shipping a few desktop AI apps, I have been gradually moving from Electron to Tauri 2. The reason is simple: bundle size, launch speed, and memory footprint were not lining up with the realities of indie development. Asking someone to download a 300MB DMG just to try your app is a tough sell, especially for a free trial.

Tauri 2's defining trait is that you write the frontend in whatever framework you like (React, Svelte, Solid, Vue, or vanilla) while the backend lives in Rust. The web view is the OS's native engine — WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux — so you do not bundle a full Chromium. An empty Tauri project's release bundle weighs in around 4–10MB on macOS. The equivalent Electron app is 80–150MB, and the difference completely changes how users perceive your download.

For our purpose — pairing it with the Claude API — the architectural payoff is that you can naturally write code where the API key never touches the renderer. You define API calls as Rust commands and the frontend invokes them through Tauri's bridge with invoke('chat', {...}). The key stays in the OS keychain (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux), and the UI layer just renders.

This article walks through one complete app: a desktop chat client backed by Claude API, with React + TypeScript on the frontend and Rust as the API bridge. By the end you'll have something you can ship.

Project setup — getting Tauri 2 running in five minutes

Assuming Rust and Node.js are installed (use rustup for Rust if you don't have it), spin up a fresh Tauri 2 project.

# 1. Scaffold a Tauri project
npm create tauri-app@latest claude-desk
# Sample answers:
#   App name: claude-desk
#   Identifier: net.dolice.claude-desk
#   Frontend: TypeScript / JavaScript
#   UI template: React
#   UI flavor: TypeScript
 
cd claude-desk
npm install
 
# 2. Add Rust crates we'll need
cd src-tauri
cargo add reqwest --features "json,stream,rustls-tls" --no-default-features
cargo add tokio --features "full"
cargo add serde --features "derive"
cargo add serde_json
cargo add futures-util
cargo add keyring
cargo add anyhow
 
# 3. Add Tauri plugins
cd ..
npm install @tauri-apps/plugin-shell @tauri-apps/plugin-updater
cargo add tauri-plugin-shell --manifest-path src-tauri/Cargo.toml
cargo add tauri-plugin-updater --manifest-path src-tauri/Cargo.toml
 
# 4. Sanity check
npm run tauri dev
# A native window should appear

The detail to internalize here is the reqwest feature flags. We pick rustls-tls to avoid the OpenSSL dynamic-linking traps that bite you when you ship binaries. OpenSSL dependence will eventually trip you up — universal binaries on macOS, distro mismatches on Linux. I have hit that wall multiple times, so I now default to rustls-tls from the very first commit.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Developers stuck on Electron's bundle size and cold-start times will be able to ship a 10MB-class desktop AI app that launches in under a second, using Tauri 2 and a thin Rust bridge
You will learn the Rust command-layer pattern that structurally prevents API key leakage to the renderer, paired with OS keychain integration that works on macOS, Windows, and Linux
By the end you will have a working pipeline that covers SSE streaming, Tool Use against local files, auto-update, and signed/notarized distribution — enough for a solo developer to ship to real users
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-06-13
Claude Vision API in Production — Implementation Patterns for Image Analysis, PDF Processing, and OCR
Implementation patterns for taking Claude's vision capabilities to production: choosing between Base64, URL, and the Files API, native PDF processing, schema-enforced extraction with Tool Use, batch cost reduction, and error recovery — all with working code.
API & SDK2026-05-06
Building an Autonomous Research Agent with Claude API: Web Search, Summarization, and Knowledge Management
A complete guide to designing and implementing an autonomous research agent using Claude API and web search tools. Covers budget control, quality assurance, and knowledge base storage for production use.
API & SDK2026-04-17
Building a GitHub PR Review Bot with Claude API — From Webhook Signature Verification to Structured Reviews with Tool Use
Build a production PR review bot with Claude API and GitHub Webhooks. Enforce structured scoring, security scanning, and suggestions via Tool Use — with signature verification, debouncing, rate limits, and cost tracking drawn from real-world operation.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →