> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Package a Tauri app

> Make a Setup.exe for a Tauri app with Bach: build the release program, let bach init fill in the config, require WebView2 and check the file list.

This guide makes a Bach setup file for a Tauri app. Tauri builds your program; Bach packages it. You don't need Tauri's own installers.

## 1. Build the app

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npm run tauri build -- --no-bundle
```

Use whatever starts the Tauri CLI in your project. `--no-bundle` (Tauri 2) skips Tauri's own installer formats. The program ends up in `src-tauri/target/release`.

## 2. Create bach.toml

Run this in your project's top folder, the one that contains `src-tauri`:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach init
```

Bach reads `src-tauri/tauri.conf.json` and `src-tauri/Cargo.toml`. A result looks like this (without the commented-out options):

```toml bach.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[app]
name = "Clip"
version = "1.1.0"
publisher = "acme"
executable = "clip.exe"

[files]
source = "src-tauri/target/release"
exclude = ["*.pdb", "*.log", "Thumbs.db", ".DS_Store", "*.d", "*.rlib", "build/**", "deps/**", "incremental/**", ".fingerprint/**", "examples/**", "bundle/**"]

[[requirements]]
kind = "webview2"   # Tauri apps run on WebView2
```

What to check:

* `publisher` is taken from the middle part of your bundle identifier (`com.acme.clip` gives `acme`). Write your real name.
* `executable` is the program Cargo builds. It's usually named after the crate, not the product name.
* `exclude` removes Cargo's build leftovers, including Tauri's own installers in `bundle/`.

## 3. Check the file list

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach check
```

`target/release` collects many files. Read the list and make sure it holds your program and what it needs, and nothing else. If your app uses sidecar programs or resource files, check they're listed. For full control, copy the files you need into a clean folder and set `source` to that folder.

## 4. Build

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bach preview
bach build
```

## About WebView2

Tauri apps show their window with Microsoft's WebView2. Windows 11 includes it, and most Windows 10 computers have it, but not all. The requirement makes the installer check for it first. If it's missing, the window explains what's needed and links to Microsoft's download page; the user installs it and clicks **Try again**.

See [Requirements](/docs/guides/requirements.md) for details.

## Updates

Tauri's updater plugin expects Tauri's own installers. Use [Bach's automatic updates](/docs/guides/automatic-updates.md) instead, and don't ship both.

## Next steps

* [Customize the install window](/docs/guides/customize-the-window.md)
* [Windows integration](/docs/guides/integration.md), such as `myapp://` links
* [Sign your setup file](/docs/guides/signing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.