TAU/ DOCS

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

KernelLanguageStrengths
ReplicadTypeScript/JSParametric BRep modeling via OpenCASCADE. STEP export.
OpenCASCADETypeScript/JSDirect OpenCASCADE API access. Full BRep control.
ManifoldTypeScript/JSRobust mesh booleans with manifold-3d.
OpenRSCADOpenSCADRust/Wasm OpenSCAD implementation in @taucad/openrscad.
JSCADTypeScript/JSParametric CSG with @jscad/modeling.
Zoo (KCL)KCLCloud CAD via the Zoo API.
glTFglTF/GLBMesh import and glTF/GLB transcoding via @taucad/gltf.
BRepSTEP/IGESBRep import via @taucad/brep.
Rhino3DMRhino import via @taucad/rhino.
AssimpMesh formatsAssimp-backed imports and transcodes via @taucad/assimp.
Build123dPythonNative Python BRep modeling and STEP export in trusted desktop projects.
tscircuitTSXElectronics: 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 rendered events.
  • Cancellation without exceptions — when a newer command takes ownership, the older call resolves with { superseded: true } instead of throwing. try/catch fires only for genuine failures.
  • Plugin architecture — extend with defineKernel, defineMiddleware, and defineBundler; 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 SharedArrayBuffer on 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

On this page