Runtime
A multi-kernel CAD runtime for browser, Node.js, and native desktop hosts.
@taucad/runtime runs multiple CAD engines behind one client API. The package ships the framework only: kernels, bundlers, middleware, and transcoders are plugins that each application composes into a runtime definition.
import { createNodeClient } from '@taucad/runtime/node';
import { defineRuntime } from '@taucad/runtime/worker';
import { esbuild } from '@taucad/esbuild';
import { replicad } from '@taucad/replicad';
const runtime = defineRuntime({ plugins: [esbuild(), replicad()] });
const client = await createNodeClient({ runtime });
const document = client.open({
source: {
files: {
'box.ts': 'import { makeBaseBox } from "replicad";\nexport default () => makeBaseBox(10, 20, 30);',
},
},
});
const result = await document.export('step');
// result.files (when result.success) -> [{ name, bytes, mimeType }]
document.close();
await client.shutdown();The same client runs in browser Web Workers, Node.js worker threads, and Electron utility processes by swapping the transport — the application code does not change.
Supported Kernels
| Kernel | Language | Strengths |
|---|---|---|
| Replicad | TypeScript/JS | Parametric BRep modeling via OpenCASCADE. STEP export. |
| OpenCASCADE | TypeScript/JS | Direct OpenCASCADE API access. Full BRep control. |
| Manifold | TypeScript/JS | Robust mesh booleans with manifold-3d. |
| OpenRSCAD | OpenSCAD | Rust/Wasm OpenSCAD implementation in @taucad/openrscad. |
| JSCAD | TypeScript/JS | Parametric CSG with @jscad/modeling. |
| Zoo (KCL) | KCL | Cloud CAD via the Zoo API. |
| glTF | glTF/GLB | Mesh import and glTF/GLB transcoding via @taucad/gltf. |
| BRep | STEP/IGES | BRep import via @taucad/brep. |
| Rhino | 3DM | Rhino import via @taucad/rhino. |
| Assimp | Mesh formats | Assimp-backed imports and transcodes via @taucad/assimp. |
| Build123d | Python | Native Python BRep modeling and STEP export in trusted desktop projects. |
| tscircuit | TSX | Electronics: 3D board, schematic, and PCB via @taucad/tscircuit. |
Key Capabilities
- Multi-kernel selection — the runtime resolves a kernel from source extensions and imports.
- Autonomous rendering — documents evaluate source and watch dependencies; independent view subscriptions project each evaluation and publish
renderedevents. - Cancellation without exceptions — when a newer command takes ownership, the older call resolves with
{ superseded: true }instead of throwing.try/catchfires only for genuine failures. - Plugin architecture — extend with
defineKernel,defineMiddleware, anddefineBundler; add caching, coordinate transforms, and edge detection through the onion-model middleware pipeline. - Worker isolation — kernel computation runs in workers over MessagePort channels, with cooperative abort backed by
SharedArrayBufferon capable transports. - Filesystem abstraction — Node.js fs, in-memory, and browser filesystems are interchangeable.
- Framework integrations — config helpers for Vite, React Router, Next.js, and Electron own the required assets, headers, and worker wiring.
Part of the Tau Ecosystem
@taucad/runtime powers Tau, the AI-powered CAD platform, and stands alone: integrate it into any JavaScript application without the Tau editor.
Explore the Documentation
- Installation — Set up the package in your project
- Quick Start — Render your first 3D model
- Guides — Task-oriented how-to guides
- Concepts — Architecture and design decisions
- API Reference — Type documentation for every public API
- Framework Integrations — Vite, React Router, Next.js, Electron, and browser-worker transports