Runtime
A multi-kernel CAD runtime for browser and Node.js with autonomous rendering, middleware, and Web Worker isolation.
@taucad/runtime
A multi-kernel CAD runtime for browser and Node.js. Run multiple CAD engines from a single, unified API with middleware support, automatic kernel selection, autonomous rendering, and Web Worker isolation.
import { createRuntimeClient, presets } from '@taucad/runtime';
const client = createRuntimeClient(presets.all());
const result = await client.export('step', {
code: {
'box.ts': `
import { makeBaseBox } from 'replicad';
export default function main() {
return makeBaseBox(10, 20, 30);
}
`,
},
});
// result.data -> { name: 'box.step', bytes: Uint8Array, mimeType: 'model/step' }Or configure individual plugins for tree-shaking:
import { createRuntimeClient } from '@taucad/runtime';
import { replicad } from '@taucad/runtime/kernels';
import { esbuild } from '@taucad/runtime/bundler';
const client = createRuntimeClient({
kernels: [replicad()],
bundlers: [esbuild()],
});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. Fast WASM workflows. |
| OpenSCAD | OpenSCAD | CSG modeling for 3D printing. Familiar .scad syntax. |
| JSCAD | TypeScript/JS | Parametric CSG with @jscad/modeling. |
| Zoo (KCL) | KCL | Cloud-native CAD with AI integration via Zoo API. |
| Tau | Any | Catch-all converter for STEP, STL, 3MF, and other file imports. |
Key Capabilities
- Multi-kernel runtime -- Switch between CAD engines based on file type or explicit selection.
- Autonomous rendering --
setFileandsetParameterstrigger autonomous rendering with file watching, debounced re-renders, and event-driven geometry push. - Plugin architecture -- Extend with custom kernels, middleware, and bundlers via
defineKernel,defineMiddleware, anddefineBundler. - Middleware pipeline -- Add caching, coordinate transforms, and edge detection with an onion-model middleware system.
- Web Worker isolation -- All kernel computation runs in Web Workers with MessagePort-based communication and SharedArrayBuffer abort signaling.
- Render cancellation -- Abort in-progress renders instantly via cooperative proxy abort, async boundary checks, and generation counters.
- Filesystem abstraction -- Use Node.js fs, in-memory, or browser-based filesystems interchangeably.
- TypeScript bundling -- Built-in esbuild integration for JS/TS kernel inputs.
Part of the Tau Ecosystem
@taucad/runtime is the CAD runtime that powers Tau, the AI-powered CAD platform. The package is designed for standalone use -- you can integrate it into any JavaScript application without the Tau editor.
The Tau ecosystem also includes:
- Tau Editor -- A web-based CAD editor with AI-assisted modeling (documentation coming soon)
- Tau Platform -- Cloud infrastructure for CAD collaboration (documentation coming soon)
Explore the Documentation
- Installation -- Set up the package in your project
- Quick Start -- Render your first 3D model in under 4 minutes
- Guides -- Task-oriented how-to guides for common workflows
- Concepts -- Understand the architecture and design decisions
- API Reference -- Complete type documentation for every public API