Skip to content
Tauri
Releases

Configuration

The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.

The configuration file is generated by the tauri init command that lives in your Tauri application source directory (src-tauri).

Once generated, you may modify it at will to customize your Tauri application.

File Formats

By default, the configuration is defined as a JSON file named tauri.conf.json.

Tauri also supports JSON5 and TOML files via the config-json5 and config-toml Cargo features, respectively. The JSON5 file name must be either tauri.conf.json or tauri.conf.json5. The TOML file name is Tauri.toml.

Platform-Specific Configuration

In addition to the default configuration file, Tauri can read a platform-specific configuration from tauri.linux.conf.json, tauri.windows.conf.json, and tauri.macos.conf.json (or Tauri.linux.toml, Tauri.windows.toml and Tauri.macos.toml if the Tauri.toml format is used), which gets merged with the main configuration object.

Configuration Structure

The configuration is composed of the following objects:

json title="Example tauri.config.json file" { "build": { "beforeBuildCommand": "", "beforeDevCommand": "", "devPath": "../dist", "distDir": "../dist" }, "package": { "productName": "tauri-app", "version": "0.1.0" }, "tauri": { "allowlist": { "all": true }, "bundle": {}, "security": { "csp": null }, "updater": { "active": false }, "windows": [ { "fullscreen": false, "height": 600, "resizable": true, "title": "Tauri App", "width": 800 } ] } }

Object Properties:

  • build
  • package
  • plugins
  • tauri

build

BuildConfig

The build configuration.

Default
{
"devPath": "http://localhost:8080/",
"distDir": "../dist",
"withGlobalTauri": false
}

package

PackageConfig

Package settings.

Default
{
"productName": null,
"version": null
}

plugins

PluginConfig

The plugins config.

Default: {}

tauri

TauriConfig

The Tauri configuration.

Default
{
"allowlist": {
"all": false,
"app": {
"all": false,
"hide": false,
"show": false
},
"clipboard": {
"all": false,
"readText": false,
"writeText": false
},
"dialog": {
"all": false,
"ask": false,
"confirm": false,
"message": false,
"open": false,
"save": false
},
"fs": {
"all": false,
"copyFile": false,
"createDir": false,
"exists": false,
"readDir": false,
"readFile": false,
"removeDir": false,
"removeFile": false,
"renameFile": false,
"scope": [],
"writeFile": false
},
"globalShortcut": {
"all": false
},
"http": {
"all": false,
"request": false,
"scope": []
},
"notification": {
"all": false
},
"os": {
"all": false
},
"path": {
"all": false
},
"process": {
"all": false,
"exit": false,
"relaunch": false,
"relaunchDangerousAllowSymlinkMacos": false
},
"protocol": {
"all": false,
"asset": false,
"assetScope": []
},
"shell": {
"all": false,
"execute": false,
"open": false,
"scope": [],
"sidecar": false
},
"window": {
"all": false,
"center": false,
"close": false,
"create": false,
"hide": false,
"maximize": false,
"minimize": false,
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setClosable": false,
"setContentProtected": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
"setIcon": false,
"setIgnoreCursorEvents": false,
"setMaxSize": false,
"setMaximizable": false,
"setMinSize": false,
"setMinimizable": false,
"setPosition": false,
"setResizable": false,
"setSize": false,
"setSkipTaskbar": false,
"setTitle": false,
"show": false,
"startDragging": false,
"unmaximize": false,
"unminimize": false
}
},
"bundle": {
"active": false,
"appimage": {
"bundleMediaFramework": false
},
"deb": {
"files": {}
},
"icon": [],
"identifier": "",
"macOS": {
"minimumSystemVersion": "10.13"
},
"targets": "all",
"windows": {
"allowDowngrades": true,
"certificateThumbprint": null,
"digestAlgorithm": null,
"nsis": null,
"timestampUrl": null,
"tsp": false,
"webviewFixedRuntimePath": null,
"webviewInstallMode": {
"silent": true,
"type": "downloadBootstrapper"
},
"wix": null
}
},
"macOSPrivateApi": false,
"pattern": {
"use": "brownfield"
},
"security": {
"dangerousDisableAssetCspModification": false,
"dangerousRemoteDomainIpcAccess": [],
"dangerousUseHttpScheme": false,
"freezePrototype": false
},
"updater": {
"active": false,
"dialog": true,
"pubkey": "",
"windows": {
"installMode": "passive",
"installerArgs": []
}
},
"windows": []
}

Definitions

AllowlistConfig

Allowlist configuration. The allowlist is a translation of the Cargo allowlist features.

Notes
  • Endpoints that don’t have their own allowlist option are enabled by default. - There is only “opt-in”, no “opt-out”. Setting an option to false has no effect.
Examples
    • "app-all": true will make the hide endpoint be available regardless of whether hide is set to false or true in the allowlist.

Object Properties:

  • all
  • app
  • clipboard
  • dialog
  • fs
  • globalShortcut
  • http
  • notification
  • os
  • path
  • process
  • protocol
  • shell
  • window
all

boolean

Use this flag to enable all API features.

app

AppAllowlistConfig

App APIs allowlist.

Default
{
"all": false,
"hide": false,
"show": false
}
clipboard

ClipboardAllowlistConfig

Clipboard APIs allowlist.

Default
{
"all": false,
"readText": false,
"writeText": false
}
dialog

DialogAllowlistConfig

Dialog API allowlist.

Default
{
"all": false,
"ask": false,
"confirm": false,
"message": false,
"open": false,
"save": false
}
fs

FsAllowlistConfig

File system API allowlist.

Default
{
"all": false,
"copyFile": false,
"createDir": false,
"exists": false,
"readDir": false,
"readFile": false,
"removeDir": false,
"removeFile": false,
"renameFile": false,
"scope": [],
"writeFile": false
}
globalShortcut

GlobalShortcutAllowlistConfig

Global shortcut API allowlist.

Default
{
"all": false
}
http

HttpAllowlistConfig

HTTP API allowlist.

Default
{
"all": false,
"request": false,
"scope": []
}
notification

NotificationAllowlistConfig

Notification API allowlist.

Default
{
"all": false
}
os

OsAllowlistConfig

OS allowlist.

Default
{
"all": false
}
path

PathAllowlistConfig

Path API allowlist.

Default
{
"all": false
}
process

ProcessAllowlistConfig

Process API allowlist.

Default
{
"all": false,
"exit": false,
"relaunch": false,
"relaunchDangerousAllowSymlinkMacos": false
}
protocol

ProtocolAllowlistConfig

Custom protocol allowlist.

Default
{
"all": false,
"asset": false,
"assetScope": []
}
shell

ShellAllowlistConfig

Shell API allowlist.

Default
{
"all": false,
"execute": false,
"open": false,
"scope": [],
"sidecar": false
}
window

WindowAllowlistConfig

Window API allowlist.

Default
{
"all": false,
"center": false,
"close": false,
"create": false,
"hide": false,
"maximize": false,
"minimize": false,
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setClosable": false,
"setContentProtected": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
"setIcon": false,
"setIgnoreCursorEvents": false,
"setMaxSize": false,
"setMaximizable": false,
"setMinSize": false,
"setMinimizable": false,
"setPosition": false,
"setResizable": false,
"setSize": false,
"setSkipTaskbar": false,
"setTitle": false,
"show": false,
"startDragging": false,
"unmaximize": false,
"unminimize": false
}

AppAllowlistConfig

Allowlist for the app APIs.

See more: https://tauri.app/v1/api/config#appallowlistconfig

Object Properties:

  • all
  • hide
  • show
all

boolean

Use this flag to enable all app APIs.

hide

boolean

Enables the app’s hide API.

show

boolean

Enables the app’s show API.

AppImageConfig

Configuration for AppImage bundles.

See more: https://tauri.app/v1/api/config#appimageconfig

Object Properties:

  • bundleMediaFramework
bundleMediaFramework

boolean

Include additional gstreamer dependencies needed for audio and video playback. This increases the bundle size by ~15-35MB depending on your build system.

AppUrl

Any of the following:

  • WindowUrl The app’s external URL, or the path to the directory containing the app assets.
  • string[] An array of files to embed on the app.

Defines the URL or assets to embed in the application.

BeforeDevCommand

Any of the following:

  • string Run the given script with the default options.
  • Run the given script with custom options. Object Properties: - cwd - script (required) - wait ##### cwd string | null The current working directory. ##### script string The script to execute. ##### wait boolean Whether tauri dev should wait for the command to finish or not. Defaults to false.

Describes the shell command to run before tauri dev.

BuildConfig

The Build configuration object.

See more: https://tauri.app/v1/api/config#buildconfig

Object Properties:

  • beforeBuildCommand
  • beforeBundleCommand
  • beforeDevCommand
  • devPath
  • distDir
  • features
  • runner
  • withGlobalTauri
beforeBuildCommand

HookCommand | null

A shell command to run before tauri build kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.

beforeBundleCommand

HookCommand | null

A shell command to run before the bundling phase in tauri build kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.

beforeDevCommand

BeforeDevCommand | null

A shell command to run before tauri dev kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.

devPath

AppUrl

The path to the application assets or URL to load in development.

This is usually an URL to a dev server, which serves your application assets with live reloading. Most modern JavaScript bundlers provides a way to start a dev server by default.

See vite, Webpack DevServer and sirv for examples on how to set up a dev server.

Default: "http://localhost:8080/"

distDir

AppUrl

The path to the application assets or URL to load in production.

When a path relative to the configuration file is provided, it is read recursively and all files are embedded in the application binary. Tauri then looks for an index.html file unless you provide a custom window URL.

You can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary. In this case, all files are added to the root and you must reference it that way in your HTML files.

When an URL is provided, the application won’t have bundled assets and the application will load that URL by default.

Default: "../dist"

features

string[] | null

Features passed to cargo commands.

runner

string | null

The binary used to build and run the application.

withGlobalTauri

boolean

Whether we should inject the Tauri API on window.__TAURI__ or not.

BundleConfig

Configuration for tauri-bundler.

See more: https://tauri.app/v1/api/config#bundleconfig

Object Properties:

  • active
  • appimage
  • category
  • copyright
  • deb
  • externalBin
  • icon
  • identifier (required)
  • longDescription
  • macOS
  • publisher
  • resources
  • shortDescription
  • targets
  • windows
active

boolean

Whether Tauri should bundle your application or just output the executable.

appimage

AppImageConfig

Configuration for the AppImage bundle.

Default
{
"bundleMediaFramework": false
}
category

string | null

The application kind.

Should be one of the following: Business, DeveloperTool, Education, Entertainment, Finance, Game, ActionGame, AdventureGame, ArcadeGame, BoardGame, CardGame, CasinoGame, DiceGame, EducationalGame, FamilyGame, KidsGame, MusicGame, PuzzleGame, RacingGame, RolePlayingGame, SimulationGame, SportsGame, StrategyGame, TriviaGame, WordGame, GraphicsAndDesign, HealthcareAndFitness, Lifestyle, Medical, Music, News, Photography, Productivity, Reference, SocialNetworking, Sports, Travel, Utility, Video, Weather.

string | null

A copyright string associated with your application.

deb

DebConfig

Configuration for the Debian bundle.

Default
{
"files": {}
}
externalBin

string[] | null

A list of—either absolute or relative—paths to binaries to embed with your application.

Note that Tauri will look for system-specific binaries following the pattern “binary-name{-target-triple}{.system-extension}“.

E.g. for the external binary “my-binary”, Tauri looks for:

  • “my-binary-x86_64-pc-windows-msvc.exe” for Windows - “my-binary-x86_64-apple-darwin” for macOS - “my-binary-x86_64-unknown-linux-gnu” for Linux

so don’t forget to provide binaries for all targeted platforms.

icon

string[]

The app’s icons

Default: []

identifier

string

The application identifier in reverse domain name notation (e.g. com.tauri.example). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).

longDescription

string | null

A longer, multi-line description of the application.

macOS

MacConfig

Configuration for the macOS bundles.

Default
{
"minimumSystemVersion": "10.13"
}
publisher

string | null

The application’s publisher. Defaults to the second element in the identifier string. Currently maps to the Manufacturer property of the Windows Installer.

resources

BundleResources | null

App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.

shortDescription

string | null

A short description of your application.

targets

BundleTarget

The bundle targets, currently supports [“deb”, “appimage”, “nsis”, “msi”, “app”, “dmg”, “updater”] or “all”.

Default: "all"

windows

WindowsConfig

Configuration for the Windows bundle.

Default
{
"allowDowngrades": true,
"certificateThumbprint": null,
"digestAlgorithm": null,
"nsis": null,
"timestampUrl": null,
"tsp": false,
"webviewFixedRuntimePath": null,
"webviewInstallMode": {
"silent": true,
"type": "downloadBootstrapper"
},
"wix": null
}

BundleResources

Any of the following:

  • string[] A list of paths to include.
  • A map of source to target paths. Allows additional properties: string

Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.

BundleTarget

Any of the following:

  • "all" Bundle all targets.
  • BundleType[] A list of bundle targets.
  • BundleType A single bundle target.

Targets to bundle. Each value is case insensitive.

BundleType

One of the following:

  • "deb" The debian bundle (.deb).
  • "appimage" The AppImage bundle (.appimage).
  • "msi" The Microsoft Installer bundle (.msi).
  • "nsis" The NSIS bundle (.exe).
  • "app" The macOS application bundle (.app).
  • "dmg" The Apple Disk Image bundle (.dmg).
  • "updater" The Tauri updater bundle.

A bundle referenced by tauri-bundler.

CliArg

A CLI argument definition.

Object Properties:

  • conflictsWith
  • conflictsWithAll
  • description
  • index
  • longDescription
  • maxValues
  • minValues
  • multiple
  • multipleOccurrences
  • name (required)
  • numberOfValues
  • possibleValues
  • required
  • requiredIfEq
  • requiredUnlessPresent
  • requiredUnlessPresentAll
  • requiredUnlessPresentAny
  • requireEquals
  • requires
  • requiresAll
  • requiresIf
  • short
  • takesValue
conflictsWith

string | null

Sets a conflicting argument by name i.e. when using this argument, the following argument can’t be present and vice versa.

conflictsWithAll

string[] | null

The same as conflictsWith but allows specifying multiple two-way conflicts per argument.

description

string | null

The argument description which will be shown on the help information. Typically, this is a short (one line) description of the arg.

index

integer | null minimum of 1, formatted as uint

The positional argument index, starting at 1.

The index refers to position according to other positional argument. It does not define position in the argument list as a whole. When utilized with multiple=true, only the last positional argument may be defined as multiple (i.e. the one with the highest index).

longDescription

string | null

The argument long description which will be shown on the help information. Typically this a more detailed (multi-line) message that describes the argument.

maxValues

integer | null formatted as uint

Specifies the maximum number of values are for this argument. For example, if you had a -f <file> argument where you wanted up to 3 ‘files’, you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values.

minValues

integer | null formatted as uint

Specifies the minimum number of values for this argument. For example, if you had a -f <file> argument where you wanted at least 2 ‘files’, you would set minValues: 2, and this argument would be satisfied if the user provided, 2 or more values.

multiple

boolean

Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once.

For example, —opt val1 val2 is allowed, but —opt val1 val2 —opt val3 is not.

NOTE: Setting this requires takes_value to be set to true.

multipleOccurrences

boolean

Specifies that the argument may appear more than once. For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed)

For example, —opt val1 —opt val2 is allowed, but —opt val1 val2 is not.

name

string

The unique argument name

numberOfValues

integer | null formatted as uint

Specifies how many values are required to satisfy this argument. For example, if you had a -f <file> argument where you wanted exactly 3 ‘files’ you would set number_of_values = 3, and this argument wouldn’t be satisfied unless the user provided 3 and only 3 values.

NOTE: Does not require multiple_occurrences = true to be set. Setting multiple_occurrences = true would allow -f <file> <file> <file> -f <file> <file> <file> where as not setting it would only allow one occurrence of this argument.

NOTE: implicitly sets takes_value = true and multiple_values = true.

possibleValues

string[] | null

Specifies a list of possible values for this argument. At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message.

required

boolean

Sets whether or not the argument is required by default.

  • Required by default means it is required, when no other conflicting rules have been evaluated - Conflicting rules take precedence over being required.
requiredIfEq

string[] | null

Allows specifying that an argument is required conditionally with the signature [arg, value] the requirement will only become valid if the arg’s value equals ${value}.

requiredUnlessPresent

string | null

Sets an arg that override this arg’s required setting i.e. this arg will be required unless this other argument is present.

requiredUnlessPresentAll

string[] | null

Sets args that override this arg’s required setting i.e. this arg will be required unless all these other arguments are present.

requiredUnlessPresentAny

string[] | null

Sets args that override this arg’s required setting i.e. this arg will be required unless at least one of these other arguments are present.

requireEquals

boolean | null

Requires that options use the —option=val syntax i.e. an equals between the option and associated value.

requires

string | null

Tets an argument by name that is required when this one is present i.e. when using this argument, the following argument must be present.

requiresAll

string[] | null

Sts multiple arguments by names that are required when this one is present i.e. when using this argument, the following arguments must be present.

requiresIf

string[] | null

Allows a conditional requirement with the signature [arg, value] the requirement will only become valid if arg’s value equals ${value}.

short

string | null maximum length of 1, minimum length of 1

The short version of the argument, without the preceding -.

NOTE: Any leading - characters will be stripped, and only the first non-character will be used as the short version.

takesValue

boolean

Specifies that the argument takes a value at run time.

NOTE: values for arguments may be specified in any of the following methods - Using a space such as -o value or —option value - Using an equals and no space such as -o=value or —option=value - Use a short and no space such as -ovalue

CliConfig

describes a CLI configuration

See more: https://tauri.app/v1/api/config#cliconfig

Object Properties:

  • afterHelp
  • args
  • beforeHelp
  • description
  • longDescription
  • subcommands
afterHelp

string | null

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.

args

CliArg[] | null

List of arguments for the command

beforeHelp

string | null

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.

description

string | null

Command description which will be shown on the help information.

longDescription

string | null

Command long description which will be shown on the help information.

subcommands

| null

List of subcommands of this command

Allows additional properties: CliConfig

ClipboardAllowlistConfig

Allowlist for the clipboard APIs.

See more: https://tauri.app/v1/api/config#clipboardallowlistconfig

Object Properties:

  • all
  • readText
  • writeText
all

boolean

Use this flag to enable all clipboard APIs.

readText

boolean

Enables the clipboard’s readText API.

writeText

boolean

Enables the clipboard’s writeText API.

Csp

Any of the following:

  • string The entire CSP policy in a single text string.
  • An object mapping a directive with its sources values as a list of strings. Allows additional properties: CspDirectiveSources

A Content-Security-Policy definition. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.

CspDirectiveSources

Any of the following:

  • string An inline list of CSP sources. Same as [Self::List], but concatenated with a space separator.
  • string[] A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.

A Content-Security-Policy directive source list. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources>.

DebConfig

Configuration for Debian (.deb) bundles.

See more: https://tauri.app/v1/api/config#debconfig

Object Properties:

  • depends
  • desktopTemplate
  • files
depends

string[] | null

The list of deb dependencies your application relies on.

desktopTemplate

string | null

Path to a custom desktop file Handlebars template.

Available variables: categories, comment (optional), exec, icon and name.

files

The files to include on the package.

Allows additional properties: string

Default: {}

DialogAllowlistConfig

Allowlist for the dialog APIs.

See more: https://tauri.app/v1/api/config#dialogallowlistconfig

Object Properties:

  • all
  • ask
  • confirm
  • message
  • open
  • save
all

boolean

Use this flag to enable all dialog API features.

ask

boolean

Allows the API to show a dialog window with Yes/No buttons.

confirm

boolean

Allows the API to show a dialog window with Ok/Cancel buttons.

message

boolean

Allows the API to show a message dialog window.

open

boolean

Allows the API to open a dialog window to pick files.

save

boolean

Allows the API to open a dialog window to pick where to save files.

DisabledCspModificationKind

Any of the following:

  • boolean If true, disables all CSP modification. false is the default value and it configures Tauri to control the CSP.
  • string[] Disables the given list of CSP directives modifications.

The possible values for the dangerous_disable_asset_csp_modification config option.

FsAllowlistConfig

Allowlist for the file system APIs.

See more: https://tauri.app/v1/api/config#fsallowlistconfig

Object Properties:

  • all
  • copyFile
  • createDir
  • exists
  • readDir
  • readFile
  • removeDir
  • removeFile
  • renameFile
  • scope
  • writeFile
all

boolean

Use this flag to enable all file system API features.

copyFile

boolean

Copy file from local filesystem.

createDir

boolean

Create directory from local filesystem.

exists

boolean

Check if path exists on the local filesystem.

readDir

boolean

Read directory from local filesystem.

readFile

boolean

Read file from local filesystem.

removeDir

boolean

Remove directory from local filesystem.

removeFile

boolean

Remove file from local filesystem.

renameFile

boolean

Rename file from local filesystem.

scope

FsAllowlistScope

The access scope for the filesystem APIs.

Default: []

writeFile

boolean

Write file to local filesystem.

FsAllowlistScope

Any of the following:

  • string[] A list of paths that are allowed by this scope.
  • A complete scope configuration. Object Properties: - allow - deny - requireLiteralLeadingDot ##### allow string[] A list of paths that are allowed by this scope. Default: [] ##### deny string[] A list of paths that are not allowed by this scope. This gets precedence over the [Self::Scope::allow] list. Default: [] ##### requireLiteralLeadingDot boolean | null Whether or not paths that contain components that start with a . will require that . appears literally in the pattern; *, ?, **, or [...] will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files. Defaults to true on Unix systems and false on Windows

Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.

Each pattern can start with a variable that resolves to a system base directory. The variables are: $AUDIO, $CACHE, $CONFIG, $DATA, $LOCALDATA, $DESKTOP, $DOCUMENT, $DOWNLOAD, $EXE, $FONT, $HOME, $PICTURE, $PUBLIC, $RUNTIME, $TEMPLATE, $VIDEO, $RESOURCE, $APP, $LOG, $TEMP, $APPCONFIG, $APPDATA, $APPLOCALDATA, $APPCACHE, $APPLOG.

GlobalShortcutAllowlistConfig

Allowlist for the global shortcut APIs.

See more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig

Object Properties:

  • all
all

boolean

Use this flag to enable all global shortcut API features.

HookCommand

Any of the following:

  • string Run the given script with the default options.
  • Run the given script with custom options. Object Properties: - cwd - script (required) ##### cwd string | null The current working directory. ##### script string The script to execute.

Describes a shell command to be executed when a CLI hook is triggered.

HttpAllowlistConfig

Allowlist for the HTTP APIs.

See more: https://tauri.app/v1/api/config#httpallowlistconfig

Object Properties:

  • all
  • request
  • scope
all

boolean

Use this flag to enable all HTTP API features.

request

boolean

Allows making HTTP requests.

scope

HttpAllowlistScope

The access scope for the HTTP APIs.

Default: []

HttpAllowlistScope

string formatted as uri[]

HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.

Examples: - “https://”: allows all HTTPS urls - “https://.github.com/tauri-apps/tauri”: allows any subdomain of “github.com” with the “tauri-apps/api” path - “https://myapi.service.com/users/*”: allows access to any URLs that begins with “https://myapi.service.com/users/

MacConfig

Configuration for the macOS bundles.

See more: https://tauri.app/v1/api/config#macconfig

Object Properties:

  • entitlements
  • exceptionDomain
  • frameworks
  • license
  • minimumSystemVersion
  • providerShortName
  • signingIdentity
entitlements

string | null

Path to the entitlements file.

exceptionDomain

string | null

Allows your application to communicate with the outside world. It should be a lowercase, without port and protocol domain name.

frameworks

string[] | null

A list of strings indicating any macOS X frameworks that need to be bundled with the application.

If a name is used, “.framework” must be omitted and it will look for standard install locations. You may also use a path to a specific framework.

license

string | null

The path to the license file to add to the DMG bundle.

minimumSystemVersion

string | null

A version string indicating the minimum macOS X version that the bundled application supports. Defaults to 10.13.

Setting it to null completely removes the LSMinimumSystemVersion field on the bundle’s Info.plist and the MACOSX_DEPLOYMENT_TARGET environment variable.

An empty string is considered an invalid value so the default value is used.

Default: "10.13"

providerShortName

string | null

Provider short name for notarization.

signingIdentity

string | null

Identity to use for code signing.

NotificationAllowlistConfig

Allowlist for the notification APIs.

See more: https://tauri.app/v1/api/config#notificationallowlistconfig

Object Properties:

  • all
all

boolean

Use this flag to enable all notification API features.

NsisCompression

One of the following:

  • "zlib" ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.
  • "bzip2" BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.
  • "lzma" LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.

Compression algorithms used in the NSIS installer.

See <https://nsis.sourceforge.io/Reference/SetCompressor>

NsisConfig

Configuration for the Installer bundle using NSIS.

Object Properties:

  • compression
  • customLanguageFiles
  • displayLanguageSelector
  • headerImage
  • installerIcon
  • installMode
  • languages
  • license
  • sidebarImage
  • template
compression

NsisCompression | null

Set the compression algorithm used to compress files in the installer.

See <https://nsis.sourceforge.io/Reference/SetCompressor>

customLanguageFiles

| null

A key-value pair where the key is the language and the value is the path to a custom .nsh file that holds the translated text for tauri’s custom messages.

See <https://github.com/tauri-apps/tauri/blob/dev/tooling/bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example .nsh file.

Note: the key must be a valid NSIS language and it must be added to [NsisConfig] languages array,

Allows additional properties: string

displayLanguageSelector

boolean

Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the languages array.

headerImage

string | null

The path to a bitmap file to display on the header of installers pages.

The recommended dimensions are 150px x 57px.

installerIcon

string | null

The path to an icon file used as the installer icon.

installMode

NSISInstallerMode

Whether the installation will be for all users or just the current user.

Default: "currentUser"

languages

string[] | null

A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set display_language_selector to true.

See <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.

license

string | null

The path to the license file to render on the installer.

sidebarImage

string | null

The path to a bitmap file for the Welcome page and the Finish page.

The recommended dimensions are 164px x 314px.

template

string | null

A custom .nsi template to use.

NSISInstallerMode

One of the following:

  • "currentUser" Default mode for the installer. Install the app by default in a directory that doesn’t require Administrator access. Installer metadata will be saved under the HKCU registry path.
  • "perMachine" Install the app by default in the Program Files folder directory requires Administrator access for the installation. Installer metadata will be saved under the HKLM registry path.
  • "both" Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only. Installer metadata will be saved under the HKLM or HKCU registry path based on the user’s choice.

Install Modes for the NSIS installer.

OsAllowlistConfig

Allowlist for the OS APIs.

See more: https://tauri.app/v1/api/config#osallowlistconfig

Object Properties:

  • all
all

boolean

Use this flag to enable all OS API features.

PackageConfig

The package configuration.

See more: https://tauri.app/v1/api/config#packageconfig

Object Properties:

  • productName
  • version
productName

string | null pattern of ^[^/\:*?"<>|]+$

App name.

version

string | null

App version. It is a semver version number or a path to a package.json file containing the version field. If removed the version number from Cargo.toml is used.

PathAllowlistConfig

Allowlist for the path APIs.

See more: https://tauri.app/v1/api/config#pathallowlistconfig

Object Properties:

  • all
all

boolean

Use this flag to enable all path API features.

PatternKind

One of the following:

  • Brownfield pattern. Object Properties: - use (required) ##### use "brownfield"
  • Isolation pattern. Recommended for security purposes. Object Properties: - options (required) - use (required) ##### options Object Properties: - dir (required) ###### dir string The dir containing the index.html file that contains the secure isolation application. ##### use "isolation"

The application pattern.

PluginConfig

The plugin configs holds a HashMap mapping a plugin name to its configuration object.

See more: https://tauri.app/v1/api/config#pluginconfig

Allows additional properties: true

ProcessAllowlistConfig

Allowlist for the process APIs.

See more: https://tauri.app/v1/api/config#processallowlistconfig

Object Properties:

  • all
  • exit
  • relaunch
  • relaunchDangerousAllowSymlinkMacos
all

boolean

Use this flag to enable all process APIs.

exit

boolean

Enables the exit API.

relaunch

boolean

Enables the relaunch API.

relaunchDangerousAllowSymlinkMacos

boolean

Dangerous option that allows macOS to relaunch even if the binary contains a symlink.

This is due to macOS having less symlink protection. Highly recommended to not set this flag unless you have a very specific reason too, and understand the implications of it.

ProtocolAllowlistConfig

Allowlist for the custom protocols.

See more: https://tauri.app/v1/api/config#protocolallowlistconfig

Object Properties:

  • all
  • asset
  • assetScope
all

boolean

Use this flag to enable all custom protocols.

asset

boolean

Enables the asset protocol.

assetScope

FsAllowlistScope

The access scope for the asset protocol.

Default: []

RemoteDomainAccessScope

External command access definition.

Object Properties:

  • domain (required)
  • enableTauriAPI
  • plugins
  • scheme
  • windows (required)
domain

string

The domain to allow.

enableTauriAPI

boolean

Enables access to the Tauri API.

plugins

string[]

The list of plugins that are allowed in this scope. The names should be without the tauri-plugin- prefix, for example "store" for tauri-plugin-store.

Default: []

scheme

string | null

The URL scheme to allow. By default, all schemas are allowed.

windows

string[]

The list of window labels this scope applies to.

SecurityConfig

Security configuration.

See more: https://tauri.app/v1/api/config#securityconfig

Object Properties:

  • csp
  • dangerousDisableAssetCspModification
  • dangerousRemoteDomainIpcAccess
  • dangerousUseHttpScheme
  • devCsp
  • freezePrototype
csp

Csp | null

The Content Security Policy that will be injected on all HTML files on the built application. If dev_csp is not specified, this value is also injected on dev.

This is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.

dangerousDisableAssetCspModification

DisabledCspModificationKind

Disables the Tauri-injected CSP sources.

At compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.

This configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.

WARNING: Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.

dangerousRemoteDomainIpcAccess

RemoteDomainAccessScope[]

Allow external domains to send command to Tauri.

By default, external domains do not have access to window.__TAURI__, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user’s device.

This configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.

WARNING: Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.

Default: []

dangerousUseHttpScheme

boolean

Sets whether the custom protocols should use http://&lt;scheme&gt;.localhost instead of the default https://&lt;scheme&gt;.localhost on Windows.

WARNING: Using a http scheme will allow mixed content when trying to fetch http endpoints and is therefore less secure but will match the behavior of the &lt;scheme&gt;://localhost protocols used on macOS and Linux.

devCsp

Csp | null

The Content Security Policy that will be injected on all HTML files on development.

This is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.

freezePrototype

boolean

Freeze the Object.prototype when using the custom protocol.

ShellAllowedArg

Any of the following:

  • string A non-configurable argument that is passed to the command in the order it was specified.
  • A variable that is set while calling the command from the webview API. Object Properties: - validator (required) ##### validator string [regex] validator to require passed values to conform to an expected input. This will require the argument value passed to this variable to match the validator regex before it will be executed. [regex]: https://docs.rs/regex/latest/regex/#syntax

A command argument allowed to be executed by the webview API.

ShellAllowedArgs

Any of the following:

  • boolean Use a simple boolean to allow all or disable all arguments to this command configuration.
  • ShellAllowedArg[] A specific set of [ShellAllowedArg] that are valid to call for the command configuration.

A set of command arguments allowed to be executed by the webview API.

A value of true will allow any arguments to be passed to the command. false will disable all arguments. A list of [ShellAllowedArg] will set those arguments as the only valid arguments to be passed to the attached command configuration.

ShellAllowedCommand

A command allowed to be executed by the webview API.

Object Properties:

  • args
  • cmd
  • name (required)
  • sidecar
args

ShellAllowedArgs

The allowed arguments for the command execution.

cmd

string

The command name. It can start with a variable that resolves to a system base directory. The variables are: $AUDIO, $CACHE, $CONFIG, $DATA, $LOCALDATA, $DESKTOP, $DOCUMENT, $DOWNLOAD, $EXE, $FONT, $HOME, $PICTURE, $PUBLIC, $RUNTIME, $TEMPLATE, $VIDEO, $RESOURCE, $APP, $LOG, $TEMP, $APPCONFIG, $APPDATA, $APPLOCALDATA, $APPCACHE, $APPLOG.

name

string

The name for this allowed shell command configuration.

This name will be used inside of the webview API to call this command along with any specified arguments.

sidecar

boolean

If this command is a sidecar command.

ShellAllowlistConfig

Allowlist for the shell APIs.

See more: https://tauri.app/v1/api/config#shellallowlistconfig

Object Properties:

  • all
  • execute
  • open
  • scope
  • sidecar
all

boolean

Use this flag to enable all shell API features.

execute

boolean

Enable binary execution.

open

ShellAllowlistOpen

Open URL with the user’s default application.

scope

ShellAllowlistScope

Access scope for the binary execution APIs. Sidecars are automatically enabled.

Default: []

sidecar

boolean

Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, an executable that is shipped with the application. For more information see <https://tauri.app/v1/guides/building/sidecar>.

ShellAllowlistOpen

Any of the following:

  • boolean If the shell open API should be enabled. If enabled, the default validation regex (^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+) is used.
  • string Enable the shell open API, with a custom regex that the opened path must match against. If using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g. --enable-debugging, -i, /R.

Defines the shell &gt; open api scope.

ShellAllowlistScope

ShellAllowedCommand[]

Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.

SystemTrayConfig

Configuration for application system tray icon.

See more: https://tauri.app/v1/api/config#systemtrayconfig

Object Properties:

  • iconAsTemplate
  • iconPath (required)
  • menuOnLeftClick
  • title
iconAsTemplate

boolean

A Boolean value that determines whether the image represents a template image on macOS.

iconPath

string

Path to the default icon to use on the system tray.

boolean

A Boolean value that determines whether the menu should appear when the tray icon receives a left click on macOS.

Default: true

title

string | null

Title for MacOS tray

TauriConfig

The Tauri configuration object.

See more: https://tauri.app/v1/api/config#tauriconfig

Object Properties:

  • allowlist
  • bundle
  • cli
  • macOSPrivateApi
  • pattern
  • security
  • systemTray
  • updater
  • windows
allowlist

AllowlistConfig

The allowlist configuration.

Default
{
"all": false,
"app": {
"all": false,
"hide": false,
"show": false
},
"clipboard": {
"all": false,
"readText": false,
"writeText": false
},
"dialog": {
"all": false,
"ask": false,
"confirm": false,
"message": false,
"open": false,
"save": false
},
"fs": {
"all": false,
"copyFile": false,
"createDir": false,
"exists": false,
"readDir": false,
"readFile": false,
"removeDir": false,
"removeFile": false,
"renameFile": false,
"scope": [],
"writeFile": false
},
"globalShortcut": {
"all": false
},
"http": {
"all": false,
"request": false,
"scope": []
},
"notification": {
"all": false
},
"os": {
"all": false
},
"path": {
"all": false
},
"process": {
"all": false,
"exit": false,
"relaunch": false,
"relaunchDangerousAllowSymlinkMacos": false
},
"protocol": {
"all": false,
"asset": false,
"assetScope": []
},
"shell": {
"all": false,
"execute": false,
"open": false,
"scope": [],
"sidecar": false
},
"window": {
"all": false,
"center": false,
"close": false,
"create": false,
"hide": false,
"maximize": false,
"minimize": false,
"print": false,
"requestUserAttention": false,
"setAlwaysOnTop": false,
"setClosable": false,
"setContentProtected": false,
"setCursorGrab": false,
"setCursorIcon": false,
"setCursorPosition": false,
"setCursorVisible": false,
"setDecorations": false,
"setFocus": false,
"setFullscreen": false,
"setIcon": false,
"setIgnoreCursorEvents": false,
"setMaxSize": false,
"setMaximizable": false,
"setMinSize": false,
"setMinimizable": false,
"setPosition": false,
"setResizable": false,
"setSize": false,
"setSkipTaskbar": false,
"setTitle": false,
"show": false,
"startDragging": false,
"unmaximize": false,
"unminimize": false
}
}
bundle

BundleConfig

The bundler configuration.

Default
{
"active": false,
"appimage": {
"bundleMediaFramework": false
},
"deb": {
"files": {}
},
"icon": [],
"identifier": "",
"macOS": {
"minimumSystemVersion": "10.13"
},
"targets": "all",
"windows": {
"allowDowngrades": true,
"certificateThumbprint": null,
"digestAlgorithm": null,
"nsis": null,
"timestampUrl": null,
"tsp": false,
"webviewFixedRuntimePath": null,
"webviewInstallMode": {
"silent": true,
"type": "downloadBootstrapper"
},
"wix": null
}
}
cli

CliConfig | null

The CLI configuration.

macOSPrivateApi

boolean

MacOS private API configuration. Enables the transparent background API and sets the fullScreenEnabled preference to true.

pattern

PatternKind

The pattern to use.

Default
{
"use": "brownfield"
}
security

SecurityConfig

Security configuration.

Default
{
"dangerousDisableAssetCspModification": false,
"dangerousRemoteDomainIpcAccess": [],
"dangerousUseHttpScheme": false,
"freezePrototype": false
}
systemTray

SystemTrayConfig | null

Configuration for app system tray.

updater

UpdaterConfig

The updater configuration.

Default
{
"active": false,
"dialog": true,
"pubkey": "",
"windows": {
"installMode": "passive",
"installerArgs": []
}
}
windows

WindowConfig[]

The windows configuration.

Default: []

Theme

One of the following:

  • "Light" Light theme.
  • "Dark" Dark theme.

System theme.

TitleBarStyle

One of the following:

  • "Visible" A normal title bar.
  • "Transparent" Makes the title bar transparent, so the window background color is shown instead. Useful if you don’t need to have actual HTML under the title bar. This lets you avoid the caveats of using TitleBarStyle::Overlay. Will be more useful when Tauri lets you set a custom window background color.
  • "Overlay" Shows the title bar as a transparent overlay over the window’s content. Keep in mind: - The height of the title bar is different on different OS versions, which can lead to window the controls and title not being where you don’t expect. - You need to define a custom drag region to make your window draggable, however due to a limitation you can’t drag the window when it’s not in focus <https://github.com/tauri-apps/tauri/issues/4316>. - The color of the window title depends on the system theme.

How the window title bar should be displayed on macOS.

UpdaterConfig

The Updater configuration object.

See more: https://tauri.app/v1/api/config#updaterconfig

Object Properties:

  • active
  • dialog
  • endpoints
  • pubkey
  • windows
active

boolean

Whether the updater is active or not.

dialog

boolean

Display built-in dialog or use event system if disabled.

Default: true

endpoints

UpdaterEndpoint[] | null

The updater endpoints. TLS is enforced on production.

The updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of linux, windows or darwin). - {{arch}}: The architecture of the machine (one of x86_64, i686, aarch64 or armv7).

pubkey

string

Signature public key.

windows

UpdaterWindowsConfig

The Windows configuration for the updater.

Default
{
"installMode": "passive",
"installerArgs": []
}

UpdaterEndpoint

string formatted as uri

A URL to an updater server.

The URL must use the https scheme on production.

UpdaterWindowsConfig

The updater configuration for Windows.

See more: https://tauri.app/v1/api/config#updaterwindowsconfig

Object Properties:

  • installerArgs
  • installMode
installerArgs

string[]

Additional arguments given to the NSIS or WiX installer.

Default: []

installMode

WindowsUpdateInstallMode

The installation mode for the update on Windows. Defaults to passive.

Default: "passive"

WebviewInstallMode

One of the following:

  • Do not install the Webview2 as part of the Windows Installer. Object Properties: - type (required) ##### type "skip"
  • Download the bootstrapper and run it. Requires an internet connection. Results in a smaller installer size, but is not recommended on Windows 7. Object Properties: - silent - type (required) ##### silent boolean Instructs the installer to run the bootstrapper in silent mode. Defaults to true. Default: true ##### type "downloadBootstrapper"
  • Embed the bootstrapper and run it. Requires an internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7. Object Properties: - silent - type (required) ##### silent boolean Instructs the installer to run the bootstrapper in silent mode. Defaults to true. Default: true ##### type "embedBootstrapper"
  • Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB. Object Properties: - silent - type (required) ##### silent boolean Instructs the installer to run the installer in silent mode. Defaults to true. Default: true ##### type "offlineInstaller"
  • Embed a fixed webview2 version and use it at runtime. Increases the installer size by around 180MB. Object Properties: - path (required) - type (required) ##### path string The path to the fixed runtime to use. The fixed version can be downloaded on the official website. The .cab file must be extracted to a folder and this folder path must be defined on this field. ##### type "fixedRuntime"

Install modes for the Webview2 runtime. Note that for the updater bundle [Self::DownloadBootstrapper] is used.

For more information see <https://tauri.app/v1/guides/building/windows>.

WindowAllowlistConfig

Allowlist for the window APIs.

See more: https://tauri.app/v1/api/config#windowallowlistconfig

Object Properties:

  • all
  • center
  • close
  • create
  • hide
  • maximize
  • minimize
  • print
  • requestUserAttention
  • setAlwaysOnTop
  • setClosable
  • setContentProtected
  • setCursorGrab
  • setCursorIcon
  • setCursorPosition
  • setCursorVisible
  • setDecorations
  • setFocus
  • setFullscreen
  • setIcon
  • setIgnoreCursorEvents
  • setMaximizable
  • setMaxSize
  • setMinimizable
  • setMinSize
  • setPosition
  • setResizable
  • setSize
  • setSkipTaskbar
  • setTitle
  • show
  • startDragging
  • unmaximize
  • unminimize
all

boolean

Use this flag to enable all window API features.

center

boolean

Allows centering the window.

close

boolean

Allows closing the window.

create

boolean

Allows dynamic window creation.

hide

boolean

Allows hiding the window.

maximize

boolean

Allows maximizing the window.

minimize

boolean

Allows minimizing the window.

print

boolean

Allows opening the system dialog to print the window content.

requestUserAttention

boolean

Allows requesting user attention on the window.

setAlwaysOnTop

boolean

Allows setting the always_on_top flag of the window.

setClosable

boolean

Allows setting whether the window’s native close button is enabled or not.

setContentProtected

boolean

Allows preventing the window contents from being captured by other apps.

setCursorGrab

boolean

Allows grabbing the cursor.

setCursorIcon

boolean

Allows changing the cursor icon.

setCursorPosition

boolean

Allows setting the cursor position.

setCursorVisible

boolean

Allows setting the cursor visibility.

setDecorations

boolean

Allows setting the decorations flag of the window.

setFocus

boolean

Allows focusing the window.

setFullscreen

boolean

Allows setting the fullscreen flag of the window.

setIcon

boolean

Allows changing the window icon.

setIgnoreCursorEvents

boolean

Allows ignoring cursor events.

setMaximizable

boolean

Allows setting whether the window’s native maximize button is enabled or not.

setMaxSize

boolean

Allows setting the window maximum size.

setMinimizable

boolean

Allows setting whether the window’s native minimize button is enabled or not.

setMinSize

boolean

Allows setting the window minimum size.

setPosition

boolean

Allows changing the position of the window.

setResizable

boolean

Allows setting the resizable flag of the window.

setSize

boolean

Allows setting the window size.

setSkipTaskbar

boolean

Allows setting the skip_taskbar flag of the window.

setTitle

boolean

Allows changing the window title.

show

boolean

Allows showing the window.

startDragging

boolean

Allows start dragging on the window.

unmaximize

boolean

Allows unmaximizing the window.

unminimize

boolean

Allows unminimizing the window.

WindowConfig

The window configuration object.

See more: https://tauri.app/v1/api/config#windowconfig

Object Properties:

  • acceptFirstMouse
  • additionalBrowserArgs
  • alwaysOnTop
  • center
  • closable
  • contentProtected
  • decorations
  • fileDropEnabled
  • focus
  • fullscreen
  • height
  • hiddenTitle
  • label
  • maxHeight
  • maximizable
  • maximized
  • maxWidth
  • minHeight
  • minimizable
  • minWidth
  • resizable
  • skipTaskbar
  • tabbingIdentifier
  • theme
  • title
  • titleBarStyle
  • transparent
  • url
  • userAgent
  • visible
  • width
  • x
  • y
acceptFirstMouse

boolean

Whether clicking an inactive window also clicks through to the webview on macOS.

additionalBrowserArgs

string | null

Defines additional browser arguments on Windows. By default wry passes --disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection so if you use this method, you also need to disable these components by yourself if you want.

alwaysOnTop

boolean

Whether the window should always be on top of other windows.

center

boolean

Whether or not the window starts centered or not.

closable

boolean

Whether the window’s native close button is enabled or not.

Platform-specific
  • Linux: “GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible” - iOS / Android: Unsupported.

Default: true

contentProtected

boolean

Prevents the window contents from being captured by other apps.

decorations

boolean

Whether the window should have borders and bars.

Default: true

fileDropEnabled

boolean

Whether the file drop is enabled or not on the webview. By default it is enabled.

Disabling it is required to use drag and drop on the frontend on Windows.

Default: true

focus

boolean

Whether the window will be initially focused or not.

Default: true

fullscreen

boolean

Whether the window starts as fullscreen or not.

height

number formatted as double

The window height.

Default: 600

hiddenTitle

boolean

If true, sets the window title to be hidden on macOS.

label

string

The window identifier. It must be alphanumeric.

Default: "main"

maxHeight

number | null formatted as double

The max window height.

maximizable

boolean

Whether the window’s native maximize button is enabled or not. If resizable is set to false, this setting is ignored.

Platform-specific
  • macOS: Disables the “zoom” button in the window titlebar, which is also used to enter fullscreen mode. - Linux / iOS / Android: Unsupported.

Default: true

maximized

boolean

Whether the window is maximized or not.

maxWidth

number | null formatted as double

The max window width.

minHeight

number | null formatted as double

The min window height.

minimizable

boolean

Whether the window’s native minimize button is enabled or not.

Platform-specific
  • Linux / iOS / Android: Unsupported.

Default: true

minWidth

number | null formatted as double

The min window width.

resizable

boolean

Whether the window is resizable or not. When resizable is set to false, native window’s maximize button is automatically disabled.

Default: true

skipTaskbar

boolean

If true, hides the window icon from the taskbar on Windows and Linux.

tabbingIdentifier

string | null

Defines the window tabbing identifier for macOS.

Windows with matching tabbing identifiers will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.

theme

Theme | null

The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.

title

string

The window title.

Default: "Tauri App"

titleBarStyle

TitleBarStyle

The style of the macOS title bar.

Default: "Visible"

transparent

boolean

Whether the window is transparent or not.

Note that on macOS this requires the macos-private-api feature flag, enabled under tauri &gt; macOSPrivateApi. WARNING: Using private APIs on macOS prevents your application from being accepted to the App Store.

url

WindowUrl

The window webview URL.

Default: "index.html"

userAgent

string | null

The user agent for the webview

visible

boolean

Whether the window is visible or not.

Default: true

width

number formatted as double

The window width.

Default: 800

x

number | null formatted as double

The horizontal position of the window’s top left corner

y

number | null formatted as double

The vertical position of the window’s top left corner

WindowsConfig

Windows bundler configuration.

See more: https://tauri.app/v1/api/config#windowsconfig

Object Properties:

  • allowDowngrades
  • certificateThumbprint
  • digestAlgorithm
  • nsis
  • timestampUrl
  • tsp
  • webviewFixedRuntimePath
  • webviewInstallMode
  • wix
allowDowngrades

boolean

Validates a second app installation, blocking the user from installing an older version if set to false.

For instance, if 1.2.1 is installed, the user won’t be able to install app version 1.2.0 or 1.1.5.

The default value of this flag is true.

Default: true

certificateThumbprint

string | null

Specifies the SHA1 hash of the signing certificate.

digestAlgorithm

string | null

Specifies the file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.

nsis

NsisConfig | null

Configuration for the installer generated with NSIS.

timestampUrl

string | null

Server to use during timestamping.

tsp

boolean

Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.

webviewFixedRuntimePath

string | null

Path to the webview fixed runtime to use. Overwrites [Self::webview_install_mode] if set.

Will be removed in v2, prefer the [Self::webview_install_mode] option.

The fixed version can be downloaded on the official website. The .cab file must be extracted to a folder and this folder path must be defined on this field.

webviewInstallMode

WebviewInstallMode

The installation mode for the Webview2 runtime.

Default
{
"silent": true,
"type": "downloadBootstrapper"
}
wix

WixConfig | null

Configuration for the MSI generated with WiX.

WindowsUpdateInstallMode

One of the following:

  • "basicUi" Specifies there’s a basic UI during the installation process, including a final dialog box at the end.
  • "quiet" The quiet mode means there’s no user interaction required. Requires admin privileges if the installer does.
  • "passive" Specifies unattended mode, which means the installation only shows a progress bar.

Install modes for the Windows update.

WindowUrl

Any of the following:

  • string formatted as uri An external URL.
  • string The path portion of an app URL. For instance, to load tauri://localhost/users/john, you can simply provide users/john in this configuration.

An URL to open on a Tauri webview window.

WixConfig

Configuration for the MSI bundle using WiX.

See more: https://tauri.app/v1/api/config#wixconfig

Object Properties:

  • bannerPath
  • componentGroupRefs
  • componentRefs
  • dialogImagePath
  • enableElevatedUpdateTask
  • featureGroupRefs
  • featureRefs
  • fragmentPaths
  • language
  • license
  • mergeRefs
  • skipWebviewInstall
  • template
bannerPath

string | null

Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.

The required dimensions are 493px × 58px.

componentGroupRefs

string[]

The ComponentGroup element ids you want to reference from the fragments.

Default: []

componentRefs

string[]

The Component element ids you want to reference from the fragments.

Default: []

dialogImagePath

string | null

Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.

enableElevatedUpdateTask

boolean

Create an elevated update task within Windows Task Scheduler.

featureGroupRefs

string[]

The FeatureGroup element ids you want to reference from the fragments.

Default: []

featureRefs

string[]

The Feature element ids you want to reference from the fragments.

Default: []

fragmentPaths

string[]

A list of paths to .wxs files with WiX fragments to use.

Default: []

language

WixLanguage

The installer languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.

Default: "en-US"

license

string | null

The path to the license file to render on the installer.

Must be an RTF file, so if a different extension is provided, we convert it to the RTF format.

mergeRefs

string[]

The Merge element ids you want to reference from the fragments.

Default: []

skipWebviewInstall

boolean

Disables the Webview2 runtime installation after app install.

Will be removed in v2, prefer the [WindowsConfig::webview_install_mode] option.

template

string | null

A custom .wxs template to use.

WixLanguage

Any of the following:

  • string A single language to build, without configuration.
  • string[] A list of languages to build, without configuration.
  • A map of languages and its configuration. Allows additional properties: WixLanguageConfig

The languages to build using WiX.

WixLanguageConfig

Configuration for a target language for the WiX build.

See more: https://tauri.app/v1/api/config#wixlanguageconfig

Object Properties:

  • localePath
localePath

string | null

The path to a locale (.wxl) file. See <https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/build_a_localized_version.html>.


© 2024 Tauri Contributors. CC-BY / MIT