# How to Build DBX from Source: Complete Guide for Rust, Tauri, and Vue

> Learn to build DBX from source in this comprehensive guide. Compile Rust, Vue, and Tauri into native desktop installers with a single make package command. Get the complete instructions here.

- Repository: [skyler/dbx](https://github.com/t8y2/dbx)
- Tags: how-to-guide
- Published: 2026-07-08

---

**The DBX repository provides a Makefile-driven build system that compiles the Rust backend, Vue frontend, and Tauri shell into native desktop installers with a single `make package` command.**

DBX is an open-source database explorer that combines a Rust backend, a Tauri desktop shell, and a Vue-based frontend. This guide explains how to build DBX from source using the automated build pipeline defined in the repository's `Makefile`, or alternatively using the Nix flake for fully reproducible builds.

## Prerequisites

Before building DBX from source, you must install the system-wide dependencies. The project requires **Node.js ≥ 18**, **pnpm**, and **Rust ≥ 1.77**.

### System Dependencies

On Linux systems, install the GTK and WebKit libraries required by Tauri:

```bash
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libappindicator3-dev \
    librsvg2-dev patchelf libssl-dev

```

### Node.js and pnpm

Install Node.js version 18 or higher using your preferred method (such as nvm), then install pnpm globally:

```bash
nvm install 18
npm install -g pnpm@latest

```

### Rust Toolchain

Install Rust using rustup if you haven't already:

```bash
curl https://sh.rustup.rs -sSf | sh

```

Select the stable toolchain when prompted.

## Cloning the Repository

Clone the DBX source code from GitHub and navigate into the project directory:

```bash
git clone https://github.com/t8y2/dbx.git
cd dbx

```

## Building DBX from Source

The repository uses a `Makefile` to orchestrate the multi-stage build process. According to the source code in `Makefile`, targets like `install` and `package` handle the complex coordination between Rust and Node.js environments.

### Installing Dependencies

Run the `install` target to fetch all Rust crates and Node.js packages:

```bash
make install

```

This command executes `pnpm install --frozen-lockfile` and ensures the Tauri CLI is available.

### Development Builds

For active development, start the Tauri dev server which hot-reloads the Vue frontend:

```bash
make dev

```

Or use the faster variant that skips DuckDB compilation for UI-focused work:

```bash
make dev-fast

```

The development server starts at `http://localhost:1420` as configured in [`src-tauri/tauri.conf.json`](https://github.com/t8y2/dbx/blob/main/src-tauri/tauri.conf.json).

### Creating Release Packages

Build the complete production installer using the `package` target:

```bash
make package

```

This command, defined in `Makefile` (lines 71-73), compiles the Rust backend in release mode, bundles the Vue frontend assets, and invokes `pnpm tauri build` to generate platform-specific installers.

## Alternative: Nix Build

For a fully reproducible build without manual tool installation, use the provided Nix flake:

```bash
nix build .#dbx-desktop

```

The build output appears in the `result/` directory. This method is documented in [`README-NIX.md`](https://github.com/t8y2/dbx/blob/main/README-NIX.md) (lines 72-78) and provides a declarative environment that automatically handles all dependencies.

## Locating Build Outputs

After running `make package`, find the generated binaries in:

```bash
src-tauri/target/release/bundle/

```

This directory contains platform-specific installers such as `.dmg` files for macOS, `.exe` for Windows, and `.AppImage` or `.deb` packages for Linux, as specified in the build configuration.

## Build Commands Reference

| Command | Purpose | Source Location |
|---------|---------|-----------------|
| `make install` | Installs Rust crates and Node packages | `Makefile` (lines 40-44) |
| `make dev` | Runs Tauri in development mode | `Makefile` |
| `make dev-fast` | Skips DuckDB for faster UI development | `Makefile` |
| `make build` | Builds only the frontend Vue bundle | `Makefile` |
| `make package` | Creates release installers | `Makefile` (lines 71-73) |
| `make test` | Executes Node and Rust test suites | `Makefile` |
| `make check` | Runs linting and formatting checks | `Makefile` |

## Summary

- **DBX** is a multi-language project combining Rust, Tauri, and Vue that requires Node.js ≥ 18, pnpm, and Rust ≥ 1.77 to build from source.
- The **`Makefile`** provides automated targets: `make install` fetches dependencies, `make dev` starts the development server, and `make package` creates release installers.
- Build outputs are written to **`src-tauri/target/release/bundle/`** and include native installers for macOS, Windows, and Linux.
- A **Nix flake** alternative at `.#dbx-desktop` offers reproducible builds without manual dependency management.
- Reference **[`README.md`](https://github.com/t8y2/dbx/blob/main/README.md)** for quick start instructions and **[`README-NIX.md`](https://github.com/t8y2/dbx/blob/main/README-NIX.md)** for Nix-specific build details.

## Frequently Asked Questions

### Where are the build instructions documented in the repository?

The primary build instructions are documented in **[`README.md`](https://github.com/t8y2/dbx/blob/main/README.md)** in the repository root, specifically in the *Build* section (lines 28-34). Additional developer setup details appear in **[`CONTRIBUTING.md`](https://github.com/t8y2/dbx/blob/main/CONTRIBUTING.md)**, while Nix-specific instructions live in **[`README-NIX.md`](https://github.com/t8y2/dbx/blob/main/README-NIX.md)**.

### Do I need to install Tauri separately?

No. The `Makefile` handles Tauri CLI installation automatically when you run `make install`. The build process uses the Tauri configuration defined in **[`src-tauri/tauri.conf.json`](https://github.com/t8y2/dbx/blob/main/src-tauri/tauri.conf.json)** to manage the desktop shell settings, icons, and bundle parameters.

### Can I build DBX without installing system dependencies manually?

Yes. If you have Nix installed, you can run `nix build .#dbx-desktop` to build the entire project in a reproducible environment that automatically provides all system libraries including GTK and WebKit. This method is defined in **`flake.nix`** and documented in **[`README-NIX.md`](https://github.com/t8y2/dbx/blob/main/README-NIX.md)**.

### What is the difference between `make dev` and `make dev-fast`?

**`make dev`** compiles the full Rust backend including DuckDB support, which is resource-intensive but provides complete database functionality. **`make dev-fast`** skips the heavy DuckDB compilation step, allowing faster iteration when working exclusively on the Vue frontend UI.