# Installation
URL: /docs/getting-started/installation



Installation [#installation]

Install `@taucad/runtime` and its peer dependencies to start using the multi-kernel CAD runtime in your project.

Prerequisites [#prerequisites]

* Node.js 20 or later
* A package manager: npm, pnpm, or yarn

Install the Package [#install-the-package]

<CodeBlockTabs defaultValue="pnpm">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="pnpm">
      pnpm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="npm">
      npm
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="yarn">
      yarn
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="pnpm">
    ```bash
    pnpm add @taucad/runtime
    ```
  </CodeBlockTab>

  <CodeBlockTab value="npm">
    ```bash
    npm install @taucad/runtime
    ```
  </CodeBlockTab>

  <CodeBlockTab value="yarn">
    ```bash
    yarn add @taucad/runtime
    ```
  </CodeBlockTab>
</CodeBlockTabs>

Framework Configuration [#framework-configuration]

Vite [#vite]

`@taucad/runtime` uses Web Workers for kernel isolation. Vite handles worker URLs natively via `new URL(..., import.meta.url)`:

```typescript
import { createRuntimeClient, presets } from '@taucad/runtime';

const client = createRuntimeClient(presets.all());
```

Node.js [#nodejs]

For server-side usage, workers run as Node.js worker threads. Use `fromNodeFS` for filesystem access:

```typescript
import { createRuntimeClient } from '@taucad/runtime';
import { fromNodeFS } from '@taucad/runtime/filesystem/node';
import { replicad } from '@taucad/runtime/kernels';
import { esbuild } from '@taucad/runtime/bundler';

const client = createRuntimeClient({
  kernels: [replicad()],
  bundlers: [esbuild()],
  fileSystem: fromNodeFS('/path/to/project'),
});
```

Subpath Imports [#subpath-imports]

The package exposes multiple subpath imports for tree-shaking:

| Import Path                  | Contents                                                                                    |
| ---------------------------- | ------------------------------------------------------------------------------------------- |
| `@taucad/runtime`            | Client, presets, `fromMemoryFS`, `fromFsLike`, plugin factories, error types, core types    |
| `@taucad/runtime/kernels`    | Kernel factories (`replicad`, `opencascade`, `manifold`, `openscad`, `jscad`, `zoo`, `tau`) |
| `@taucad/runtime/middleware` | `defineMiddleware` and built-in middleware factories                                        |
| `@taucad/runtime/bundler`    | `defineBundler` and esbuild bundler factory                                                 |
| `@taucad/runtime/transport`  | Transport layer (`createWorkerTransport`, `createInProcessTransport`)                       |
| `@taucad/runtime/filesystem` | `fromNodeFS` (Node.js-only), plus `fromMemoryFS`, `fromFsLike`, bridge utilities            |
| `@taucad/runtime/types`      | All TypeScript type exports                                                                 |
| `@taucad/runtime/testing`    | Testing utilities for kernel and middleware development                                     |
| `@taucad/runtime/worker`     | Runtime worker entry point ([`KernelRuntimeWorker`](../concepts/worker-model))              |

`fromMemoryFS` and `fromFsLike` are available from both the main `@taucad/runtime` entry and `@taucad/runtime/filesystem`. `fromNodeFS` is only available from `@taucad/runtime/filesystem` because it depends on Node.js APIs.

What's Next [#whats-next]

* [Quick Start](./quick-start) -- Render your first 3D model in under 4 minutes
* [API Reference: Client](../api/client) -- Full API documentation for `createRuntimeClient`
