configuring-tauri-apps
Guides developers through Tauri v2 configuration including tauri.conf.json structure, Cargo.toml settings, environment-specific configs, and common configuration options for desktop and mobile applications.
What this skill does
# Tauri Configuration Files
Tauri v2 applications use three primary configuration files to manage application behavior, dependencies, and build processes.
## Configuration File Overview
| File | Purpose | Format |
|------|---------|--------|
| `tauri.conf.json` | Tauri-specific settings | JSON, JSON5, or TOML |
| `Cargo.toml` | Rust dependencies and metadata | TOML |
| `package.json` | Frontend dependencies and scripts | JSON |
## tauri.conf.json
The main configuration file located in `src-tauri/`. Defines application metadata, window behavior, bundling options, and plugin settings.
### Supported Formats
- **JSON** (default): `tauri.conf.json`
- **JSON5**: `tauri.conf.json5` (requires `config-json5` Cargo feature)
- **TOML**: `Tauri.toml` (requires `config-toml` Cargo feature)
### Complete Configuration Structure
```json
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "MyApp",
"version": "1.0.0",
"identifier": "com.company.myapp",
"mainBinaryName": "my-app",
"build": {
"devUrl": "http://localhost:3000",
"frontendDist": "../dist",
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"features": ["custom-feature"],
"removeUnusedCommands": true
},
"app": {
"withGlobalTauri": false,
"macOSPrivateApi": false,
"windows": [
{
"title": "My Application",
"width": 1200,
"height": 800,
"minWidth": 800,
"minHeight": 600,
"resizable": true,
"fullscreen": false,
"center": true,
"visible": true,
"decorations": true,
"transparent": false,
"alwaysOnTop": false,
"focus": true,
"url": "index.html"
}
],
"security": {
"capabilities": [],
"assetProtocol": {
"enable": true,
"scope": ["$APPDATA/**"]
},
"pattern": { "use": "brownfield" },
"freezePrototype": false
},
"trayIcon": {
"id": "main-tray",
"iconPath": "icons/tray.png",
"iconAsTemplate": true
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/icon.icns", "icons/icon.ico"],
"resources": ["assets/**/*"],
"copyright": "Copyright 2024",
"category": "Utility",
"shortDescription": "A short app description",
"longDescription": "A longer description",
"licenseFile": "../LICENSE",
"windows": {
"certificateThumbprint": null,
"timestampUrl": "http://timestamp.digicert.com",
"nsis": { "license": "../LICENSE", "installerIcon": "icons/icon.ico", "installMode": "currentUser" }
},
"macOS": {
"minimumSystemVersion": "10.13",
"signingIdentity": null,
"dmg": { "appPosition": { "x": 180, "y": 170 }, "applicationFolderPosition": { "x": 480, "y": 170 } }
},
"linux": {
"appimage": { "bundleMediaFramework": false },
"deb": { "depends": ["libwebkit2gtk-4.1-0"] },
"rpm": { "depends": ["webkit2gtk4.1"] }
},
"android": { "minSdkVersion": 24 },
"iOS": { "minimumSystemVersion": "13.0" }
},
"plugins": {
"updater": {
"pubkey": "YOUR_PUBLIC_KEY",
"endpoints": ["https://releases.example.com/{{target}}/{{arch}}/{{current_version}}"]
}
}
}
```
### Root-Level Fields
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `productName` | string | No | Application display name |
| `version` | string | No | Semver version or path to package.json |
| `identifier` | string | Yes | Reverse domain identifier (e.g., `com.tauri.example`) |
| `mainBinaryName` | string | No | Override the main binary filename |
### Build Configuration Fields
| Field | Type | Description |
|-------|------|-------------|
| `devUrl` | string | Development server URL for hot-reload |
| `frontendDist` | string | Path to built frontend assets or remote URL |
| `beforeDevCommand` | string | Script to run before `tauri dev` |
| `beforeBuildCommand` | string | Script to run before `tauri build` |
| `features` | string[] | Cargo features to enable during build |
| `removeUnusedCommands` | boolean | Strip unused plugin commands from binary |
### Window Configuration Options
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `title` | string | `"Tauri"` | Window title |
| `width` / `height` | number | `800` / `600` | Window dimensions in pixels |
| `minWidth` / `minHeight` | number | - | Minimum dimensions |
| `maxWidth` / `maxHeight` | number | - | Maximum dimensions |
| `x` / `y` | number | - | Window position |
| `resizable` | boolean | `true` | Allow window resizing |
| `fullscreen` | boolean | `false` | Start in fullscreen |
| `center` | boolean | `false` | Center window on screen |
| `visible` | boolean | `true` | Window visibility on start |
| `decorations` | boolean | `true` | Show window decorations |
| `transparent` | boolean | `false` | Enable window transparency |
| `alwaysOnTop` | boolean | `false` | Keep window above others |
| `url` | string | `"index.html"` | Initial URL to load |
### Security Configuration
| Field | Type | Description |
|-------|------|-------------|
| `capabilities` | string[] | Permission capabilities for the application |
| `assetProtocol.enable` | boolean | Enable custom asset protocol |
| `assetProtocol.scope` | string[] | Allowed paths for asset protocol |
| `pattern.use` | string | Security pattern (`"brownfield"` default) |
| `freezePrototype` | boolean | Prevent prototype mutation |
### Bundle Targets by Platform
| Platform | Targets |
|----------|---------|
| Windows | `nsis`, `msi` |
| macOS | `app`, `dmg` |
| Linux | `appimage`, `deb`, `rpm` |
| Android | `apk`, `aab` |
| iOS | `app` |
## Platform-Specific Configuration
Create platform-specific files that override base configuration using JSON Merge Patch (RFC 7396).
| Platform | Filename |
|----------|----------|
| Linux | `tauri.linux.conf.json` |
| Windows | `tauri.windows.conf.json` |
| macOS | `tauri.macos.conf.json` |
| Android | `tauri.android.conf.json` |
| iOS | `tauri.ios.conf.json` |
Example `src-tauri/tauri.windows.conf.json`:
```json
{
"app": {
"windows": [{ "title": "My App - Windows Edition" }]
},
"bundle": {
"windows": { "nsis": { "installMode": "perMachine" } }
}
}
```
Example `src-tauri/tauri.macos.conf.json`:
```json
{
"app": { "macOSPrivateApi": true },
"bundle": {
"macOS": { "minimumSystemVersion": "11.0", "entitlements": "entitlements.plist" }
}
}
```
## CLI Configuration Override
```bash
# Development with custom config
tauri dev --config src-tauri/tauri.dev.conf.json
# Build with beta configuration
tauri build --config src-tauri/tauri.beta.conf.json
# Inline configuration override
tauri build --config '{"bundle":{"identifier":"com.company.myapp.beta"}}'
```
## Cargo.toml Configuration
Located in `src-tauri/Cargo.toml`, manages Rust dependencies.
```toml
[package]
name = "my-app"
version = "1.0.0"
edition = "2021"
[build-dependencies]
tauri-build = { version = "2.0", features = [] }
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tauri = { version = "2.0", features = [] }
tauri-plugin-shell = "2.0"
tauri-plugin-opener = "2.0"
[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
```
### Common Tauri Features
```toml
[dependencies]
tauri = { version = "2.0", features = [
"config-json5", # Enable JSON5 config format
"config-toml", # Enable TOML config format
"devtools", # Enable WebView devtools
"macos-private-api", # Enable macOS private APIs
"tray-icon", # Enable system tray support
"image-png", # PNG image support
"image-ico", # ICO image support
"protocol-asset" # Custom asset protocol
] }
```
### Version Management
```toml
tauri = { version = "2.0" } # Semver-compatible (recommended)
tauri = { version = "=2.0.0Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.