Web Workers
Offload computation to background threads while keeping the UI responsive. Shows MessagePortChannel with React and Vite.
cmd-ipc ships example projects for both language implementations. Each example is a complete, runnable application under ts/examples/ or rust/examples/ in the repository.
| Example | Language | Transport | Shows |
|---|---|---|---|
| Web Workers | TypeScript | MessagePortChannel | Offload computation to background threads, React + Vite |
| Electron | TypeScript | MessagePortChannel | Main ↔ renderer IPC with shared schemas |
| Cloudflare Workers | TypeScript | HTTPChannel | Edge-deployed HTTP commands with remote schema generation |
| AI Agent MCP | TypeScript | MCPClient/Server | Expose commands as AI agent tools |
| Multi-Service | Rust | InMemoryChannel | Cross-registry routing, #[command_service] macro, event fan-out |
Web Workers
Offload computation to background threads while keeping the UI responsive. Shows MessagePortChannel with React and Vite.
Electron
Type-safe IPC between main and renderer processes in desktop apps. Demonstrates shared schemas across processes.
Cloudflare Workers
HTTP-based commands with remote schema generation. Shows HTTPChannel for edge computing.
AI Agent MCP
Expose commands as AI agent tools via tool calling. Easily integrate with Vercel AI SDK, OpenAI, Anthropic, and other frameworks.
Multi-Service
Two registries (root and worker) wired through an in-memory channel with a REPL on the root. Demonstrates the #[command_service] macro, cross-registry routing, and event fan-out.