---
title: "Build from source"
description: "Build the runtime and CLI from the streamlib repository, for a setup the app and installer don't cover, or to work on the runtime itself."
type: "docs-page"
url: "https://tatolab.com/docs/install/from-source"
site: "Tatolab"
section: "Install"
---

# Build from source

> Build the runtime and CLI from the streamlib repository, for a setup the app and installer don't cover, or to work on the runtime itself.

The runtime and CLI are built from the [streamlib repository](https://github.com/tatolab/streamlib). A source build gives you the same `tatolabd` and `tatolab` the app and installer carry. Nothing starts the runtime for you: you run `tatolabd` in a terminal of its own.

## What you need

- **Rust**, installed with [rustup](https://rustup.rs).
- **uv** on your `PATH`; the build runs its pinned Python tools through `uvx`. See [Install uv](https://tatolab.com/docs/install/python#install-uv).
- **A native toolchain.** On Debian or Ubuntu:

  ```sh
  sudo apt install pkg-config protobuf-compiler libclang-dev libvulkan-dev python3-dev cmake ninja-build
  ```

  The Linux build also needs **Docker**: it first builds a Vulkan loader, Mesa's lavapipe and the Slang shader compiler inside the release's pinned manylinux image, and puts them in the runtime.

  On macOS, CMake and Ninja (`brew install cmake ninja`) with the Xcode command line tools. The build puts a Vulkan loader, MoltenVK and the Slang shader compiler inside the runtime, so the Mac that runs it needs no Vulkan SDK.

The platforms are the same as the app's: Linux x86_64 with a Vulkan GPU driver, or an Apple silicon Mac with macOS 26 or later.

## Build

```sh
git clone https://github.com/tatolab/streamlib.git
cd streamlib
cargo xtask build-runtime --release
```

The first build takes a while. When it finishes, `target/tatolab-runtime/` is laid out like an installed copy:

```txt
target/tatolab-runtime/
├── bin/
│   ├── tatolabd        the runtime
│   ├── tatolab         the CLI
│   └── uv              the uv the runtime makes each project's .venv with
└── lib/tatolab/
    └── lend/           the runtime's Python half, which each node's interpreter borrows
```

Keep `bin/` and `lib/` together: `tatolabd` finds `lib/tatolab/lend/` relative to itself, and each Python node's interpreter puts it first on its path, never in your `.venv`. To move the build, copy the whole `tatolab-runtime` folder.

Put it on your `PATH`:

```sh
export PATH="$PWD/target/tatolab-runtime/bin:$PATH"
```

Add that line, with the full path, to `~/.bashrc` or `~/.zshrc` to keep it.

## Start the runtime

In a terminal of its own:

```sh
tatolabd
```

Leave it running. It's the runtime for the whole machine: every project you open runs in it. It runs in the foreground until you press Ctrl-C, which stops its streams. If Tato Studio is open, its runtime already holds the machine and a second one is refused; the app, in turn, uses a runtime it finds running and never restarts it.

In another terminal, check that it answers:

```sh
tatolab streams
```

```txt title="Output"
No streams in this runtime.
```

You're ready for the [quickstart](https://tatolab.com/docs/quickstart).

## Notes for macOS

**Camera and microphone prompts name your terminal app**, not Tato, because the terminal started the runtime. Allow access for Terminal, iTerm or whichever you use in **System Settings › Privacy & Security**.

## Updating

```sh
git pull
cargo xtask build-runtime --release
```

Then stop `tatolabd` with Ctrl-C and start it again. It opens your projects again as it starts.

A debug build, without `--release`, builds faster and runs slower; it's useful when you're working on the runtime itself.
