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

KernelLanguageStrengths
ReplicadTypeScript/JSParametric BRep modeling via OpenCASCADE. STEP export.
OpenCASCADETypeScript/JSDirect OpenCASCADE API access. Full BRep control.
ManifoldTypeScript/JSRobust mesh booleans with manifold-3d. Fast WASM workflows.
OpenSCADOpenSCADCSG modeling for 3D printing. Familiar .scad syntax.
JSCADTypeScript/JSParametric CSG with @jscad/modeling.
Zoo (KCL)KCLCloud-native CAD with AI integration via Zoo API.
TauAnyCatch-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 -- setFile and setParameters trigger 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, and defineBundler.
  • 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