Platform
XMachines provides a platform-agnostic core runtime built on Web Streams. To use XMachines in specific environments, you’ll use platform-specific packages.
Available Platforms
Section titled “Available Platforms”XMachines platforms provide tooling and adapters for different JavaScript runtimes and use cases. Each platform defines how to integrate XMachines with specific environments or protocols while maintaining the core deterministic execution model.
Play enables you to build universal frontend applications that run identically across any JavaScript runtime—browser, Node, Deno, edge functions—with zero code changes.
- Learn about Play →
- Package:
@xmachines/play-*(signals, router, react, etc.) - Use Case: Frontend apps, universal rendering, AI-driven navigation
- RFC: play-v1
Key Features:
- Strict separation between business logic (Actor), runtime (Adapter), and view (UI)
- TC39 Signals-based reactivity
- Works with React, TanStack Router, and XState v5
- Business logic has zero knowledge of runtime environment
Browser
Section titled “Browser”Browser-specific adapters for non-isomorphic Web APIs using Web Streams.
- Learn about Browser →
- Package:
@xmachines/browser(alias),browser-dom,browser-ws,browser-worker - Use Case: Direct browser API access, WebSocket connections, Web Workers
- RFC: browser-v1
Key Features:
- Optional dependency - only when you need browser-specific APIs
- Stream-based adapters for DOM, WebSocket, Workers
- No persistence or protocol semantics
Node-specific adapters for non-isomorphic Node APIs.
- Learn about Node →
- Package:
node-stream,node-process - Use Case: Node-specific stream adapters, process management
- RFC: node-v1
Key Features:
- Focused adapters for Node-specific functionality
- Web Streams remain canonical
- No generic
@xmachines/nodepackage - use specific adapters
Coming Soon
Section titled “Coming Soon”The following platforms are in RFC/design phase:
- REST - HTTP projection of machines and runs (RFC)
- MCP - Model Context Protocol for AI agents (RFC)
- CLI - Command-line interface tools (RFC)
Choosing a Platform
Section titled “Choosing a Platform”| If you’re building… | Use this platform |
|---|---|
| Backend API or service | Core runtime + Node adapters (optional) |
| Frontend web application | Play |
| Universal app (SSR + CSR) | Play |
| Browser extension | Browser |
| REST API endpoint | REST (coming soon) |
| AI agent tool | MCP (coming soon) |
Platform Philosophy
Section titled “Platform Philosophy”All XMachines platforms follow these principles:
- Web Streams are canonical - All I/O uses Web Streams API
- Platform adapters are optional - Use them only when you need platform-specific features
- Core runtime is universal - The same state machine logic works everywhere
- Projection over execution - Platforms define representation, never execution behavior