# How to Enable Specific Features for the Tauri Shell in OpenHuman: A Complete Guide

> Unlock Tauri shell features in OpenHuman easily. This guide shows how to add feature flags to Cargo.toml and rebuild for custom functionality. Get started now.

- Repository: [Tiny Humans/openhuman](https://github.com/tinyhumansai/openhuman)
- Tags: how-to-guide
- Published: 2026-08-31

---

**Enable Tauri shell features in OpenHuman by adding feature flags to [`app/src-tauri/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/Cargo.toml) and rebuilding with `cargo build --features "feature-name"`.**

OpenHuman's desktop client is built with **Tauri v2**, and its shell functionality is controlled through Cargo's feature system. This guide shows you how to locate the feature configuration, enable specific capabilities like the updater or custom protocols, and rebuild the application with your selected features.

## Locating the Tauri Shell Configuration

The Tauri shell in OpenHuman is defined as a Rust crate located at `app/src-tauri/`. The primary configuration file for feature toggles is:

- **[`app/src-tauri/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/Cargo.toml)** — defines the available Cargo features and their dependencies
- **[`app/src-tauri/tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/tauri.conf.json)** — provides runtime configuration for enabled features

These files work together: [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) controls which code is compiled into the binary, while [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) configures how those features behave at runtime.

## Enabling Featured in Cargo.toml

Feature flags are declared in the `[features]` section of the shell's manifest. OpenHuman likely includes a default feature set that you can extend.

### Structure of the Features Table

```toml

# app/src-tauri/Cargo.toml

[features]

# Base feature set that ships with the app

default = ["api"]

# Optional features you can enable individually

updater = ["tauri/updater"]
protocol = ["tauri/protocol"]
devtools = ["tauri/devtools"]

```

Each feature maps to a corresponding feature in the `tauri` crate. When you enable a feature, Cargo pulls in the additional dependencies and compiles the associated code.

### Common Tauri Shell Features for OpenHuman

| Feature | Purpose | Required Config |
|---------|---------|---------------|
| `updater` | Automatic app updates | [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) updater section |
| `protocol` | Custom URL scheme handler (e.g., `openhuman://`) | `tauri.protocols` array |
| `devtools` | Web inspector for debugging | None (automatically available) |
| `api` | Core Tauri JavaScript API | Included in default |

## Building with Specific Features

Once you've defined or selected features, rebuild the Tauri shell with those flags enabled.

### Using Cargo Directly

```bash

# Build release binary with updater and protocol features

cargo build --release \
    --manifest-path app/src-tauri/Cargo.toml \
    --features "updater,protocol"

```

### Using pnpm Scripts

OpenHuman provides convenience scripts that pass features through to Cargo:

```bash

# Development build with selected features

pnpm dev:app --features "updater,protocol"

# Production build

pnpm build:app --features "updater,protocol"

```

### Verifying Feature Activation

After building, confirm your features are active:

- **devtools**: Press `Ctrl+Shift+I` (Linux/Windows) or `Cmd+Option+I` (macOS) to open the web inspector
- **updater**: Check the application menu for "Check for Updates" or examine logs for updater initialization
- **protocol**: Register the protocol with your OS and test opening `openhuman://` links

## Configuring Enabled Features in tauri.conf.json

Some features require additional runtime configuration. The [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) file controls how enabled features behave.

### Configuring the Updater

```json
{
  "tauri": {
    "updater": {
      "active": true,
      "endpoints": [
        "https://api.openhuman.ai/releases/{{target}}/{{current_version}}"
      ],
      "pubkey": "YOUR_PUBLIC_KEY_HERE",
      "windows": {
        "installMode": "passive"
      }
    }
  }
}

```

### Configuring a Custom Protocol

When the `protocol` feature is enabled, define the scheme and handler:

```json
{
  "tauri": {
    "protocols": [
      {
        "scheme": "openhuman",
        "handler": "src-tauri/src/protocol.rs"
      }
    ]
  }
}

```

Then implement the handler in [`app/src-tauri/src/protocol.rs`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/src/protocol.rs):

```rust
use tauri::Manager;

pub fn handle_protocol<R: tauri::Runtime>(app: &tauri::AppHandle<R>, request: tauri::InvokePayload) {
    // Handle openhuman:// URLs
    if let Some(url) = request.body.as_str() {
        println!("Received protocol request: {}", url);
        // Route to appropriate application logic
    }
}

```

## Creating Composite Features

For complex builds, group multiple features together:

```toml

# app/src-tauri/Cargo.toml

[features]
default = ["api"]

# Individual features

updater = ["tauri/updater"]
protocol = ["tauri/protocol"]
devtools = ["tauri/devtools"]

# Composite feature for enterprise builds

enterprise = ["updater", "protocol", "tauri/system-tray"]

# Composite feature for development

dev = ["devtools", "protocol"]

```

Build with composite features the same way:

```bash
cargo build --release --features "enterprise"

```

## Key Source Files Reference

| File | Path | Purpose |
|------|------|---------|
| Shell manifest | [`app/src-tauri/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/Cargo.toml) | Feature definitions and crate dependencies |
| Runtime config | [`app/src-tauri/tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/tauri.conf.json) | Feature behavior and window configuration |
| Library entry point | [`app/src-tauri/src/lib.rs`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/src/lib.rs) | Tauri command handlers and IPC bridge |
| Protocol handler | [`app/src-tauri/src/protocol.rs`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/src/protocol.rs) | Custom URL scheme implementation (create if needed) |
| Build script | [`app/src-tauri/build.rs`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/build.rs) | Pre-build configuration and code generation |

## Summary

- **Feature flags live in [`app/src-tauri/Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/app/src-tauri/Cargo.toml)** under the `[features]` table
- **Enable features** by adding them to the default set or passing `--features "name"` to cargo
- **Rebuild required**: Feature selection happens at compile time, not runtime
- **Configure behavior** in [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) for features that need runtime settings
- **Use composite features** to simplify complex build configurations

## Frequently Asked Questions

### How do I check which features are currently enabled in my build?

Run cargo with the `--verbose` flag and examine the feature resolution output, or check the compiled binary's metadata with `cargo tree -f "{p} {f}"` in the `app/src-tauri` directory. The most reliable method is inspecting the [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) file before building.

### Can I enable Tauri features without rebuilding the application?

No. Tauri features are compile-time flags that conditionally include code and dependencies. Changing features requires a full rebuild of the Rust binary. For runtime toggles, use Tauri's configuration system in [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) or implement feature flags in your application logic.

### What's the difference between [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) and [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) features?

[`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) features control what code gets compiled into the binary — they affect binary size and available APIs. [`tauri.conf.json`](https://github.com/tinyhumansai/openhuman/blob/main/tauri.conf.json) controls how enabled features behave at runtime — URLs, window settings, and feature-specific options. Both are required: you must compile with the feature enabled, then configure it appropriately in the JSON file.