mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
3698 lines
144 KiB
JSON
3698 lines
144 KiB
JSON
{
|
||
"$id": "https://schema.tauri.app/config/2.10.3",
|
||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
"title": "Config",
|
||
"description": "The Tauri configuration object.\nIt is read from a file where you can define your frontend assets,\nconfigure the bundler and define a tray icon.\n\nThe configuration file is generated by the\n[`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\nyour Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\nThe JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\nThe TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can\nread a platform-specific configuration from `tauri.linux.conf.json`,\n`tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n(or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\nwhich gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`app`](#appconfig): The Tauri configuration\n- [`build`](#buildconfig): The build configuration\n- [`bundle`](#bundleconfig): The bundle configurations\n- [`plugins`](#pluginconfig): The plugins configuration\n\nExample tauri.config.json file:\n\n```json\n{\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n}\n```",
|
||
"type": "object",
|
||
"properties": {
|
||
"$schema": {
|
||
"description": "The JSON schema for the Tauri config.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"productName": {
|
||
"description": "App name.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"pattern": "^[^/\\:*?\"<>|]+$"
|
||
},
|
||
"mainBinaryName": {
|
||
"description": "Overrides app's main binary filename.\n\nBy default, Tauri uses the output binary from `cargo`, by setting this, we will rename that binary in `tauri-cli`'s\n`tauri build` command, and target `tauri bundle` to it\n\nIf possible, change the [`package name`] or set the [`name field`] instead,\nand if that's not enough and you're using nightly, consider using the [`different-binary-name`] feature instead\n\nNote: this config should not include the binary extension (e.g. `.exe`), we'll add that for you\n\n[`package name`]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field\n[`name field`]: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-name-field\n[`different-binary-name`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#different-binary-name",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"version": {
|
||
"description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field.\n\nIf removed the version number from `Cargo.toml` is used.\nIt's recommended to manage the app versioning in the Tauri config.\n\n## Platform-specific\n\n- **macOS**: Translates to the bundle's CFBundleShortVersionString property and is used as the default CFBundleVersion.\n You can set an specific bundle version using [`bundle > macOS > bundleVersion`](MacConfig::bundle_version).\n- **iOS**: Translates to the bundle's CFBundleShortVersionString property and is used as the default CFBundleVersion.\n You can set an specific bundle version using [`bundle > iOS > bundleVersion`](IosConfig::bundle_version).\n The `tauri ios build` CLI command has a `--build-number <number>` option that lets you append a build number to the app version.\n- **Android**: By default version 1.0 is used. You can set a version code using [`bundle > android > versionCode`](AndroidConfig::version_code).\n\nBy default version 1.0 is used on Android.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"identifier": {
|
||
"description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\nThis string must be unique across applications since it is used in system configurations like\nthe bundle ID and path to the webview data directory.\nThis string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\nand periods (.).",
|
||
"type": "string"
|
||
},
|
||
"app": {
|
||
"description": "The App configuration.",
|
||
"default": {
|
||
"windows": [],
|
||
"security": {
|
||
"freezePrototype": false,
|
||
"dangerousDisableAssetCspModification": false,
|
||
"assetProtocol": {
|
||
"scope": [],
|
||
"enable": false
|
||
},
|
||
"pattern": {
|
||
"use": "brownfield"
|
||
},
|
||
"capabilities": []
|
||
},
|
||
"macOSPrivateApi": false,
|
||
"withGlobalTauri": false,
|
||
"enableGTKAppId": false
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/AppConfig"
|
||
}
|
||
]
|
||
},
|
||
"build": {
|
||
"description": "The build configuration.",
|
||
"default": {
|
||
"removeUnusedCommands": false,
|
||
"additionalWatchFolders": []
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/BuildConfig"
|
||
}
|
||
]
|
||
},
|
||
"bundle": {
|
||
"description": "The bundler configuration.",
|
||
"default": {
|
||
"active": false,
|
||
"targets": "all",
|
||
"createUpdaterArtifacts": false,
|
||
"icon": [],
|
||
"useLocalToolsDir": false,
|
||
"windows": {
|
||
"digestAlgorithm": null,
|
||
"certificateThumbprint": null,
|
||
"timestampUrl": null,
|
||
"tsp": false,
|
||
"webviewInstallMode": {
|
||
"type": "downloadBootstrapper",
|
||
"silent": true
|
||
},
|
||
"allowDowngrades": true,
|
||
"wix": null,
|
||
"nsis": null,
|
||
"signCommand": null
|
||
},
|
||
"linux": {
|
||
"appimage": {
|
||
"bundleMediaFramework": false,
|
||
"files": {}
|
||
},
|
||
"deb": {
|
||
"files": {}
|
||
},
|
||
"rpm": {
|
||
"release": "1",
|
||
"epoch": 0,
|
||
"files": {}
|
||
}
|
||
},
|
||
"macOS": {
|
||
"files": {},
|
||
"minimumSystemVersion": "10.13",
|
||
"hardenedRuntime": true,
|
||
"dmg": {
|
||
"windowSize": {
|
||
"width": 660,
|
||
"height": 400
|
||
},
|
||
"appPosition": {
|
||
"x": 180,
|
||
"y": 170
|
||
},
|
||
"applicationFolderPosition": {
|
||
"x": 480,
|
||
"y": 170
|
||
}
|
||
}
|
||
},
|
||
"iOS": {
|
||
"minimumSystemVersion": "14.0"
|
||
},
|
||
"android": {
|
||
"minSdkVersion": 24,
|
||
"autoIncrementVersionCode": false
|
||
}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/BundleConfig"
|
||
}
|
||
]
|
||
},
|
||
"plugins": {
|
||
"description": "The plugins config.",
|
||
"default": {},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/PluginConfig"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"identifier"
|
||
],
|
||
"definitions": {
|
||
"AppConfig": {
|
||
"description": "The App configuration object.\n\nSee more: <https://v2.tauri.app/reference/config/#appconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"windows": {
|
||
"description": "The app windows configuration.\n\n## Example:\n\nTo create a window at app startup\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nIf not specified, the window's label (its identifier) defaults to \"main\",\nyou can use this label to get the window through\n`app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\nWhen working with multiple windows, each window will need an unique label\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nYou can also set `create` to false and use this config through the Rust APIs\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nand use it like this\n\n```rust\ntauri::Builder::<tauri::Wry>::new()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/WindowConfig"
|
||
},
|
||
"default": []
|
||
},
|
||
"security": {
|
||
"description": "Security configuration.",
|
||
"default": {
|
||
"freezePrototype": false,
|
||
"dangerousDisableAssetCspModification": false,
|
||
"assetProtocol": {
|
||
"scope": [],
|
||
"enable": false
|
||
},
|
||
"pattern": {
|
||
"use": "brownfield"
|
||
},
|
||
"capabilities": []
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/SecurityConfig"
|
||
}
|
||
]
|
||
},
|
||
"trayIcon": {
|
||
"description": "Configuration for app tray icon.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/TrayIconConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"macOSPrivateApi": {
|
||
"description": "MacOS private API configuration. Enables the transparent background API and sets the `fullScreenEnabled` preference to `true`.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"withGlobalTauri": {
|
||
"description": "Whether we should inject the Tauri API on `window.__TAURI__` or not.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"enableGTKAppId": {
|
||
"description": "If set to true \"identifier\" will be set as GTK app ID (on systems that use GTK).",
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"WindowConfig": {
|
||
"description": "The window configuration object.\n\nSee more: <https://v2.tauri.app/reference/config/#windowconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"description": "The window identifier. It must be alphanumeric.",
|
||
"type": "string",
|
||
"default": "main"
|
||
},
|
||
"create": {
|
||
"description": "Whether Tauri should create this window at app startup or not.\n\nWhen this is set to `false` you must manually grab the config object via `app.config().app.windows`\nand create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).\n\n## Example:\n\n```rust\ntauri::Builder::<tauri::Wry>::new()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"url": {
|
||
"description": "The window webview URL.",
|
||
"default": "index.html",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/WebviewUrl"
|
||
}
|
||
]
|
||
},
|
||
"userAgent": {
|
||
"description": "The user agent for the webview",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"dragDropEnabled": {
|
||
"description": "Whether the drag and drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use HTML5 drag and drop on the frontend on Windows.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"center": {
|
||
"description": "Whether or not the window starts centered or not.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"x": {
|
||
"description": "The horizontal position of the window's top left corner in logical pixels",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"y": {
|
||
"description": "The vertical position of the window's top left corner in logical pixels",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"width": {
|
||
"description": "The window width in logical pixels.",
|
||
"type": "number",
|
||
"format": "double",
|
||
"default": 800.0
|
||
},
|
||
"height": {
|
||
"description": "The window height in logical pixels.",
|
||
"type": "number",
|
||
"format": "double",
|
||
"default": 600.0
|
||
},
|
||
"minWidth": {
|
||
"description": "The min window width in logical pixels.",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"minHeight": {
|
||
"description": "The min window height in logical pixels.",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"maxWidth": {
|
||
"description": "The max window width in logical pixels.",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"maxHeight": {
|
||
"description": "The max window height in logical pixels.",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"preventOverflow": {
|
||
"description": "Whether or not to prevent the window from overflowing the workarea\n\n## Platform-specific\n\n- **iOS / Android:** Unsupported.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/PreventOverflowConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"resizable": {
|
||
"description": "Whether the window is resizable or not. When resizable is set to false, native window's maximize button is automatically disabled.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"maximizable": {
|
||
"description": "Whether the window's native maximize button is enabled or not.\nIf resizable is set to false, this setting is ignored.\n\n## Platform-specific\n\n- **macOS:** Disables the \"zoom\" button in the window titlebar, which is also used to enter fullscreen mode.\n- **Linux / iOS / Android:** Unsupported.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"minimizable": {
|
||
"description": "Whether the window's native minimize button is enabled or not.\n\n## Platform-specific\n\n- **Linux / iOS / Android:** Unsupported.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"closable": {
|
||
"description": "Whether the window's native close button is enabled or not.\n\n## Platform-specific\n\n- **Linux:** \"GTK+ will do its best to convince the window manager not to show a close button.\n Depending on the system, this function may not have any effect when called on a window that is already visible\"\n- **iOS / Android:** Unsupported.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"title": {
|
||
"description": "The window title.",
|
||
"type": "string",
|
||
"default": "Tauri App"
|
||
},
|
||
"fullscreen": {
|
||
"description": "Whether the window starts as fullscreen or not.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"focus": {
|
||
"description": "Whether the window will be initially focused or not.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"focusable": {
|
||
"description": "Whether the window will be focusable or not.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"transparent": {
|
||
"description": "Whether the window is transparent or not.\n\nNote that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri > macOSPrivateApi`.\nWARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"maximized": {
|
||
"description": "Whether the window is maximized or not.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"visible": {
|
||
"description": "Whether the window is visible or not.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"decorations": {
|
||
"description": "Whether the window should have borders and bars.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"alwaysOnBottom": {
|
||
"description": "Whether the window should always be below other windows.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"alwaysOnTop": {
|
||
"description": "Whether the window should always be on top of other windows.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"visibleOnAllWorkspaces": {
|
||
"description": "Whether the window should be visible on all workspaces or virtual desktops.\n\n## Platform-specific\n\n- **Windows / iOS / Android:** Unsupported.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"contentProtected": {
|
||
"description": "Prevents the window contents from being captured by other apps.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"skipTaskbar": {
|
||
"description": "If `true`, hides the window icon from the taskbar on Windows and Linux.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"windowClassname": {
|
||
"description": "The name of the window class created on Windows to create the window. **Windows only**.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"theme": {
|
||
"description": "The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Theme"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"titleBarStyle": {
|
||
"description": "The style of the macOS title bar.",
|
||
"default": "Visible",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/TitleBarStyle"
|
||
}
|
||
]
|
||
},
|
||
"trafficLightPosition": {
|
||
"description": "The position of the window controls on macOS.\n\nRequires titleBarStyle: Overlay and decorations: true.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/LogicalPosition"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"hiddenTitle": {
|
||
"description": "If `true`, sets the window title to be hidden on macOS.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"acceptFirstMouse": {
|
||
"description": "Whether clicking an inactive window also clicks through to the webview on macOS.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"tabbingIdentifier": {
|
||
"description": "Defines the window [tabbing identifier] for macOS.\n\nWindows with matching tabbing identifiers will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled.\n\n[tabbing identifier]: <https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"additionalBrowserArgs": {
|
||
"description": "Defines additional browser arguments on Windows. By default wry passes `--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection`\nso if you use this method, you also need to disable these components by yourself if you want.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"shadow": {
|
||
"description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:**\n - `false` has no effect on decorated window, shadow are always ON.\n - `true` will make undecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"windowEffects": {
|
||
"description": "Window effects.\n\nRequires the window to be transparent.\n\n## Platform-specific:\n\n- **Windows**: If using decorations or shadows, you may want to try this workaround <https://github.com/tauri-apps/tao/issues/72#issuecomment-975607891>\n- **Linux**: Unsupported",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/WindowEffectsConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"incognito": {
|
||
"description": "Whether or not the webview should be launched in incognito mode.\n\n## Platform-specific:\n\n- **Android**: Unsupported.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"parent": {
|
||
"description": "Sets the window associated with this label to be the parent of the window to be created.\n\n## Platform-specific\n\n- **Windows**: This sets the passed parent as an owner window to the window to be created.\n From [MSDN owned windows docs](https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows):\n - An owned window is always above its owner in the z-order.\n - The system automatically destroys an owned window when its owner is destroyed.\n - An owned window is hidden when its owner is minimized.\n- **Linux**: This makes the new window transient for parent, see <https://docs.gtk.org/gtk3/method.Window.set_transient_for.html>\n- **macOS**: This adds the window as a child of parent, see <https://developer.apple.com/documentation/appkit/nswindow/1419152-addchildwindow?language=objc>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"proxyUrl": {
|
||
"description": "The proxy URL for the WebView for all network requests.\n\nMust be either a `http://` or a `socks5://` URL.\n\n## Platform-specific\n\n- **macOS**: Requires the `macos-proxy` feature flag and only compiles for macOS 14+.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "uri"
|
||
},
|
||
"zoomHotkeysEnabled": {
|
||
"description": "Whether page zooming by hotkeys is enabled\n\n## Platform-specific:\n\n- **Windows**: Controls WebView2's [`IsZoomControlEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2settings?view=webview2-winrt-1.0.2420.47#iszoomcontrolenabled) setting.\n- **MacOS / Linux**: Injects a polyfill that zooms in and out with `ctrl/command` + `-/=`,\n20% in each step, ranging from 20% to 1000%. Requires `webview:allow-set-webview-zoom` permission\n\n- **Android / iOS**: Unsupported.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"browserExtensionsEnabled": {
|
||
"description": "Whether browser extensions can be installed for the webview process\n\n## Platform-specific:\n\n- **Windows**: Enables the WebView2 environment's [`AreBrowserExtensionsEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions?view=webview2-winrt-1.0.2739.15#arebrowserextensionsenabled)\n- **MacOS / Linux / iOS / Android** - Unsupported.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"useHttpsScheme": {
|
||
"description": "Sets whether the custom protocols should use `https://<scheme>.localhost` instead of the default `http://<scheme>.localhost` on Windows and Android. Defaults to `false`.\n\n## Note\n\nUsing a `https` scheme will NOT allow mixed content when trying to fetch `http` endpoints and therefore will not match the behavior of the `<scheme>://localhost` protocols used on macOS and Linux.\n\n## Warning\n\nChanging this value between releases will change the IndexedDB, cookies and localstorage location and your app will not be able to access the old data.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"devtools": {
|
||
"description": "Enable web inspector which is usually called browser devtools. Enabled by default.\n\nThis API works in **debug** builds, but requires `devtools` feature flag to enable it in **release** builds.\n\n## Platform-specific\n\n- macOS: This will call private functions on **macOS**.\n- Android: Open `chrome://inspect/#devices` in Chrome to get the devtools window. Wry's `WebView` devtools API isn't supported on Android.\n- iOS: Open Safari > Develop > [Your Device Name] > [Your WebView] to get the devtools window.",
|
||
"type": [
|
||
"boolean",
|
||
"null"
|
||
]
|
||
},
|
||
"backgroundColor": {
|
||
"description": "Set the window and webview background color.\n\n## Platform-specific:\n\n- **Windows**: alpha channel is ignored for the window layer.\n- **Windows**: On Windows 7, alpha channel is ignored for the webview layer.\n- **Windows**: On Windows 8 and newer, if alpha channel is not `0`, it will be ignored for the webview layer.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Color"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"backgroundThrottling": {
|
||
"description": "Change the default background throttling behaviour.\n\nBy default, browsers use a suspend policy that will throttle timers and even unload\nthe whole tab (view) to free resources after roughly 5 minutes when a view became\nminimized or hidden. This will pause all tasks until the documents visibility state\nchanges back from hidden to visible by bringing the view back to the foreground.\n\n## Platform-specific\n\n- **Linux / Windows / Android**: Unsupported. Workarounds like a pending WebLock transaction might suffice.\n- **iOS**: Supported since version 17.0+.\n- **macOS**: Supported since version 14.0+.\n\nsee https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/BackgroundThrottlingPolicy"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"javascriptDisabled": {
|
||
"description": "Whether we should disable JavaScript code execution on the webview or not.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"allowLinkPreview": {
|
||
"description": "on macOS and iOS there is a link preview on long pressing links, this is enabled by default.\nsee https://docs.rs/objc2-web-kit/latest/objc2_web_kit/struct.WKWebView.html#method.allowsLinkPreview",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"disableInputAccessoryView": {
|
||
"description": "Allows disabling the input accessory view on iOS.\n\nThe accessory view is the view that appears above the keyboard when a text input element is focused.\nIt usually displays a view with \"Done\", \"Next\" buttons.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"dataDirectory": {
|
||
"description": "Set a custom path for the webview's data directory (localStorage, cache, etc.) **relative to [`appDataDir()`]/${label}**.\n\nTo set absolute paths, use [`WebviewWindowBuilder::data_directory`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.data_directory)\n\n#### Platform-specific:\n\n- **Windows**: WebViews with different values for settings like `additionalBrowserArgs`, `browserExtensionsEnabled` or `scrollBarStyle` must have different data directories.\n- **macOS / iOS**: Unsupported, use `dataStoreIdentifier` instead.\n- **Android**: Unsupported.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"dataStoreIdentifier": {
|
||
"description": "Initialize the WebView with a custom data store identifier. This can be seen as a replacement for `dataDirectory` which is unavailable in WKWebView.\nSee https://developer.apple.com/documentation/webkit/wkwebsitedatastore/init(foridentifier:)?language=objc\n\nThe array must contain 16 u8 numbers.\n\n#### Platform-specific:\n\n- **iOS**: Supported since version 17.0+.\n- **macOS**: Supported since version 14.0+.\n- **Windows / Linux / Android**: Unsupported.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
"minItems": 16,
|
||
"maxItems": 16
|
||
},
|
||
"scrollBarStyle": {
|
||
"description": "Specifies the native scrollbar style to use with the webview.\nCSS styles that modify the scrollbar are applied on top of the native appearance configured here.\n\nDefaults to `default`, which is the browser default.\n\n## Platform-specific\n\n- **Windows**:\n - `fluentOverlay` requires WebView2 Runtime version 125.0.2535.41 or higher,\n and does nothing on older versions.\n - This option must be given the same value for all webviews that target the same data directory.\n- **Linux / Android / iOS / macOS**: Unsupported. Only supports `Default` and performs no operation.",
|
||
"default": "default",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/ScrollBarStyle"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"WebviewUrl": {
|
||
"description": "An URL to open on a Tauri webview window.",
|
||
"anyOf": [
|
||
{
|
||
"description": "An external URL. Must use either the `http` or `https` schemes.",
|
||
"type": "string",
|
||
"format": "uri"
|
||
},
|
||
{
|
||
"description": "The path portion of an app URL.\nFor instance, to load `tauri://localhost/users/john`,\nyou can simply provide `users/john` in this configuration.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "A custom protocol url, for example, `doom://index.html`",
|
||
"type": "string",
|
||
"format": "uri"
|
||
}
|
||
]
|
||
},
|
||
"PreventOverflowConfig": {
|
||
"description": "Prevent overflow with a margin",
|
||
"anyOf": [
|
||
{
|
||
"description": "Enable prevent overflow or not",
|
||
"type": "boolean"
|
||
},
|
||
{
|
||
"description": "Enable prevent overflow with a margin\nso that the window's size + this margin won't overflow the workarea",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/PreventOverflowMargin"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"PreventOverflowMargin": {
|
||
"description": "Enable prevent overflow with a margin\nso that the window's size + this margin won't overflow the workarea",
|
||
"type": "object",
|
||
"properties": {
|
||
"width": {
|
||
"description": "Horizontal margin in physical pixels",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"height": {
|
||
"description": "Vertical margin in physical pixels",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"width",
|
||
"height"
|
||
]
|
||
},
|
||
"Theme": {
|
||
"description": "System theme.",
|
||
"oneOf": [
|
||
{
|
||
"description": "Light theme.",
|
||
"type": "string",
|
||
"const": "Light"
|
||
},
|
||
{
|
||
"description": "Dark theme.",
|
||
"type": "string",
|
||
"const": "Dark"
|
||
}
|
||
]
|
||
},
|
||
"TitleBarStyle": {
|
||
"description": "How the window title bar should be displayed on macOS.",
|
||
"oneOf": [
|
||
{
|
||
"description": "A normal title bar.",
|
||
"type": "string",
|
||
"const": "Visible"
|
||
},
|
||
{
|
||
"description": "Makes the title bar transparent, so the window background color is shown instead.\n\nUseful 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.",
|
||
"type": "string",
|
||
"const": "Transparent"
|
||
},
|
||
{
|
||
"description": "Shows the title bar as a transparent overlay over the window's content.\n\nKeep in mind:\n- 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.\n- 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>.\n- The color of the window title depends on the system theme.",
|
||
"type": "string",
|
||
"const": "Overlay"
|
||
}
|
||
]
|
||
},
|
||
"LogicalPosition": {
|
||
"description": "Position coordinates struct.",
|
||
"type": "object",
|
||
"properties": {
|
||
"x": {
|
||
"description": "X coordinate.",
|
||
"type": "number",
|
||
"format": "double"
|
||
},
|
||
"y": {
|
||
"description": "Y coordinate.",
|
||
"type": "number",
|
||
"format": "double"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"x",
|
||
"y"
|
||
]
|
||
},
|
||
"WindowEffectsConfig": {
|
||
"description": "The window effects configuration object",
|
||
"type": "object",
|
||
"properties": {
|
||
"effects": {
|
||
"description": "List of Window effects to apply to the Window.\nConflicting effects will apply the first one and ignore the rest.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/WindowEffect"
|
||
}
|
||
},
|
||
"state": {
|
||
"description": "Window effect state **macOS Only**",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/WindowEffectState"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"radius": {
|
||
"description": "Window effect corner radius **macOS Only**",
|
||
"type": [
|
||
"number",
|
||
"null"
|
||
],
|
||
"format": "double"
|
||
},
|
||
"color": {
|
||
"description": "Window effect color. Affects [`WindowEffect::Blur`] and [`WindowEffect::Acrylic`] only\non Windows 10 v1903+. Doesn't have any effect on Windows 7 or Windows 11.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Color"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"effects"
|
||
]
|
||
},
|
||
"WindowEffect": {
|
||
"description": "Platform-specific window effects",
|
||
"oneOf": [
|
||
{
|
||
"description": "A default material appropriate for the view's effectiveAppearance. **macOS 10.14-**",
|
||
"type": "string",
|
||
"const": "appearanceBased",
|
||
"deprecated": true
|
||
},
|
||
{
|
||
"description": "**macOS 10.14-**",
|
||
"type": "string",
|
||
"const": "light",
|
||
"deprecated": true
|
||
},
|
||
{
|
||
"description": "**macOS 10.14-**",
|
||
"type": "string",
|
||
"const": "dark",
|
||
"deprecated": true
|
||
},
|
||
{
|
||
"description": "**macOS 10.14-**",
|
||
"type": "string",
|
||
"const": "mediumLight",
|
||
"deprecated": true
|
||
},
|
||
{
|
||
"description": "**macOS 10.14-**",
|
||
"type": "string",
|
||
"const": "ultraDark",
|
||
"deprecated": true
|
||
},
|
||
{
|
||
"description": "**macOS 10.10+**",
|
||
"type": "string",
|
||
"const": "titlebar"
|
||
},
|
||
{
|
||
"description": "**macOS 10.10+**",
|
||
"type": "string",
|
||
"const": "selection"
|
||
},
|
||
{
|
||
"description": "**macOS 10.11+**",
|
||
"type": "string",
|
||
"const": "menu"
|
||
},
|
||
{
|
||
"description": "**macOS 10.11+**",
|
||
"type": "string",
|
||
"const": "popover"
|
||
},
|
||
{
|
||
"description": "**macOS 10.11+**",
|
||
"type": "string",
|
||
"const": "sidebar"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "headerView"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "sheet"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "windowBackground"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "hudWindow"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "fullScreenUI"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "tooltip"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "contentBackground"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "underWindowBackground"
|
||
},
|
||
{
|
||
"description": "**macOS 10.14+**",
|
||
"type": "string",
|
||
"const": "underPageBackground"
|
||
},
|
||
{
|
||
"description": "Mica effect that matches the system dark preference **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "mica"
|
||
},
|
||
{
|
||
"description": "Mica effect with dark mode but only if dark mode is enabled on the system **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "micaDark"
|
||
},
|
||
{
|
||
"description": "Mica effect with light mode **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "micaLight"
|
||
},
|
||
{
|
||
"description": "Tabbed effect that matches the system dark preference **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "tabbed"
|
||
},
|
||
{
|
||
"description": "Tabbed effect with dark mode but only if dark mode is enabled on the system **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "tabbedDark"
|
||
},
|
||
{
|
||
"description": "Tabbed effect with light mode **Windows 11 Only**",
|
||
"type": "string",
|
||
"const": "tabbedLight"
|
||
},
|
||
{
|
||
"description": "**Windows 7/10/11(22H1) Only**\n\n## Notes\n\nThis effect has bad performance when resizing/dragging the window on Windows 11 build 22621.",
|
||
"type": "string",
|
||
"const": "blur"
|
||
},
|
||
{
|
||
"description": "**Windows 10/11 Only**\n\n## Notes\n\nThis effect has bad performance when resizing/dragging the window on Windows 10 v1903+ and Windows 11 build 22000.",
|
||
"type": "string",
|
||
"const": "acrylic"
|
||
}
|
||
]
|
||
},
|
||
"WindowEffectState": {
|
||
"description": "Window effect state **macOS only**\n\n<https://developer.apple.com/documentation/appkit/nsvisualeffectview/state>",
|
||
"oneOf": [
|
||
{
|
||
"description": "Make window effect state follow the window's active state",
|
||
"type": "string",
|
||
"const": "followsWindowActiveState"
|
||
},
|
||
{
|
||
"description": "Make window effect state always active",
|
||
"type": "string",
|
||
"const": "active"
|
||
},
|
||
{
|
||
"description": "Make window effect state always inactive",
|
||
"type": "string",
|
||
"const": "inactive"
|
||
}
|
||
]
|
||
},
|
||
"Color": {
|
||
"description": "A tuple struct of RGBA colors. Each value has minimum of 0 and maximum of 255.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Color hex string, for example: #fff, #ffffff, or #ffffffff.",
|
||
"type": "string",
|
||
"pattern": "^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$"
|
||
},
|
||
{
|
||
"description": "Array of RGB colors. Each value has minimum of 0 and maximum of 255.",
|
||
"type": "array",
|
||
"minItems": 3,
|
||
"maxItems": 3,
|
||
"items": [
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Array of RGBA colors. Each value has minimum of 0 and maximum of 255.",
|
||
"type": "array",
|
||
"minItems": 4,
|
||
"maxItems": 4,
|
||
"items": [
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Object of red, green, blue, alpha color values. Each value has minimum of 0 and maximum of 255.",
|
||
"type": "object",
|
||
"properties": {
|
||
"red": {
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
"green": {
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
"blue": {
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255
|
||
},
|
||
"alpha": {
|
||
"type": "integer",
|
||
"format": "uint8",
|
||
"minimum": 0,
|
||
"maximum": 255,
|
||
"default": 255
|
||
}
|
||
},
|
||
"required": [
|
||
"red",
|
||
"green",
|
||
"blue"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"BackgroundThrottlingPolicy": {
|
||
"description": "Background throttling policy.",
|
||
"oneOf": [
|
||
{
|
||
"description": "A policy where background throttling is disabled",
|
||
"type": "string",
|
||
"const": "disabled"
|
||
},
|
||
{
|
||
"description": "A policy where a web view that's not in a window fully suspends tasks. This is usually the default behavior in case no policy is set.",
|
||
"type": "string",
|
||
"const": "suspend"
|
||
},
|
||
{
|
||
"description": "A policy where a web view that's not in a window limits processing, but does not fully suspend tasks.",
|
||
"type": "string",
|
||
"const": "throttle"
|
||
}
|
||
]
|
||
},
|
||
"ScrollBarStyle": {
|
||
"description": "The scrollbar style to use in the webview.\n\n## Platform-specific\n\n- **Windows**: This option must be given the same value for all webviews that target the same data directory.",
|
||
"oneOf": [
|
||
{
|
||
"description": "The scrollbar style to use in the webview.",
|
||
"type": "string",
|
||
"const": "default"
|
||
},
|
||
{
|
||
"description": "Fluent UI style overlay scrollbars. **Windows Only**\n\nRequires WebView2 Runtime version 125.0.2535.41 or higher, does nothing on older versions,\nsee https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/?tabs=dotnetcsharp#10253541",
|
||
"type": "string",
|
||
"const": "fluentOverlay"
|
||
}
|
||
]
|
||
},
|
||
"SecurityConfig": {
|
||
"description": "Security configuration.\n\nSee more: <https://v2.tauri.app/reference/config/#securityconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"csp": {
|
||
"description": "The Content Security Policy that will be injected on all HTML files on the built application.\nIf [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured.\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Csp"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"devCsp": {
|
||
"description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured.\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Csp"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"freezePrototype": {
|
||
"description": "Freeze the `Object.prototype` when using the custom protocol.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"dangerousDisableAssetCspModification": {
|
||
"description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy\nto only allow loading of your own scripts and styles by injecting nonce and hash sources.\nThis stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value.\nA boolean instructs Tauri to disable the injection for all CSP injections,\nand a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP.\nYour application might be vulnerable to XSS attacks without this Tauri protection.",
|
||
"default": false,
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/DisabledCspModificationKind"
|
||
}
|
||
]
|
||
},
|
||
"assetProtocol": {
|
||
"description": "Custom protocol config.",
|
||
"default": {
|
||
"scope": [],
|
||
"enable": false
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/AssetProtocolConfig"
|
||
}
|
||
]
|
||
},
|
||
"pattern": {
|
||
"description": "The pattern to use.",
|
||
"default": {
|
||
"use": "brownfield"
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/PatternKind"
|
||
}
|
||
]
|
||
},
|
||
"capabilities": {
|
||
"description": "List of capabilities that are enabled on the application.\n\nBy default (not set or empty list), all capability files from `./capabilities/` are included,\nby setting values in this entry, you have fine grained control over which capabilities are included\n\nYou can either reference a capability file defined in `./capabilities/` with its identifier or inline a [`Capability`]\n\n### Example\n\n```json\n{\n \"app\": {\n \"capabilities\": [\n \"main-window\",\n {\n \"identifier\": \"drag-window\",\n \"permissions\": [\"core:window:allow-start-dragging\"]\n }\n ]\n }\n}\n```",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/CapabilityEntry"
|
||
},
|
||
"default": []
|
||
},
|
||
"headers": {
|
||
"description": "The headers, which are added to every http response from tauri to the web view\nThis doesn't include IPC Messages and error responses",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"Csp": {
|
||
"description": "A Content-Security-Policy definition.\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
|
||
"anyOf": [
|
||
{
|
||
"description": "The entire CSP policy in a single text string.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "An object mapping a directive with its sources values as a list of strings.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/CspDirectiveSources"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"CspDirectiveSources": {
|
||
"description": "A Content-Security-Policy directive source list.\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources>.",
|
||
"anyOf": [
|
||
{
|
||
"description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"DisabledCspModificationKind": {
|
||
"description": "The possible values for the `dangerous_disable_asset_csp_modification` config option.",
|
||
"anyOf": [
|
||
{
|
||
"description": "If `true`, disables all CSP modification.\n`false` is the default value and it configures Tauri to control the CSP.",
|
||
"type": "boolean"
|
||
},
|
||
{
|
||
"description": "Disables the given list of CSP directives modifications.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"AssetProtocolConfig": {
|
||
"description": "Config for the asset custom protocol.\n\nSee more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"scope": {
|
||
"description": "The access scope for the asset protocol.",
|
||
"default": [],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/FsScope"
|
||
}
|
||
]
|
||
},
|
||
"enable": {
|
||
"description": "Enables the asset protocol.",
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"FsScope": {
|
||
"description": "Protocol scope definition.\nIt is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory.\nThe variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`,\n`$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`,\n`$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$TEMP`,\n`$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||
"anyOf": [
|
||
{
|
||
"description": "A list of paths that are allowed by this scope.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"description": "A complete scope configuration.",
|
||
"type": "object",
|
||
"properties": {
|
||
"allow": {
|
||
"description": "A list of paths that are allowed by this scope.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"deny": {
|
||
"description": "A list of paths that are not allowed by this scope.\nThis gets precedence over the [`Self::Scope::allow`] list.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"requireLiteralLeadingDot": {
|
||
"description": "Whether or not paths that contain components that start with a `.`\nwill require that `.` appears literally in the pattern; `*`, `?`, `**`,\nor `[...]` will not match. This is useful because such files are\nconventionally considered hidden on Unix systems and it might be\ndesirable to skip them when listing files.\n\nDefaults to `true` on Unix systems and `false` on Windows",
|
||
"type": [
|
||
"boolean",
|
||
"null"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"PatternKind": {
|
||
"description": "The application pattern.",
|
||
"oneOf": [
|
||
{
|
||
"description": "Brownfield pattern.",
|
||
"type": "object",
|
||
"properties": {
|
||
"use": {
|
||
"type": "string",
|
||
"const": "brownfield"
|
||
}
|
||
},
|
||
"required": [
|
||
"use"
|
||
]
|
||
},
|
||
{
|
||
"description": "Isolation pattern. Recommended for security purposes.",
|
||
"type": "object",
|
||
"properties": {
|
||
"use": {
|
||
"type": "string",
|
||
"const": "isolation"
|
||
},
|
||
"options": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dir": {
|
||
"description": "The dir containing the index.html file that contains the secure isolation application.",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"dir"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"use",
|
||
"options"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"CapabilityEntry": {
|
||
"description": "A capability entry which can be either an inlined capability or a reference to a capability defined on its own file.",
|
||
"anyOf": [
|
||
{
|
||
"description": "An inlined capability.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Capability"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Reference to a capability identifier.",
|
||
"type": "string"
|
||
}
|
||
]
|
||
},
|
||
"Capability": {
|
||
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows' and webviews' fine grained access\nto the Tauri core, application, or plugin commands.\nIf a webview or its window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce\nimpact of frontend vulnerabilities in less privileged windows.\nWindows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`.\nA Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json\n{\n \"identifier\": \"main-user-files-write\",\n \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programmatic access to files selected by the user.\",\n \"windows\": [\n \"main\"\n ],\n \"permissions\": [\n \"core:default\",\n \"dialog:open\",\n {\n \"identifier\": \"fs:allow-write-text-file\",\n \"allow\": [{ \"path\": \"$HOME/test.txt\" }]\n },\n ],\n \"platforms\": [\"macOS\",\"windows\"]\n}\n```",
|
||
"type": "object",
|
||
"properties": {
|
||
"identifier": {
|
||
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "Description of what the capability is intended to allow on associated windows.\n\nIt should contain a description of what the grouped permissions should allow.\n\n## Example\n\nThis capability allows the `main` window access to `filesystem` write related\ncommands and `dialog` commands to enable programmatic access to files selected by the user.",
|
||
"type": "string",
|
||
"default": ""
|
||
},
|
||
"remote": {
|
||
"description": "Configure remote URLs that can use the capability permissions.\n\nThis setting is optional and defaults to not being set, as our\ndefault use case is that the content is served from our local application.\n\n:::caution\nMake sure you understand the security implications of providing remote\nsources with local system access.\n:::\n\n## Example\n\n```json\n{\n \"urls\": [\"https://*.mydomain.dev\"]\n}\n```",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/CapabilityRemote"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"local": {
|
||
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"windows": {
|
||
"description": "List of windows that are affected by this capability. Can be a glob pattern.\n\nIf a window label matches any of the patterns in this list,\nthe capability will be enabled on all the webviews of that window,\nregardless of the value of [`Self::webviews`].\n\nOn multiwebview windows, prefer specifying [`Self::webviews`] and omitting [`Self::windows`]\nfor a fine grained access control.\n\n## Example\n\n`[\"main\"]`",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"webviews": {
|
||
"description": "List of webviews that are affected by this capability. Can be a glob pattern.\n\nThe capability will be enabled on all the webviews\nwhose label matches any of the patterns in this list,\nregardless of whether the webview's window label matches a pattern in [`Self::windows`].\n\n## Example\n\n`[\"sub-webview-one\", \"sub-webview-two\"]`",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"permissions": {
|
||
"description": "List of permissions attached to this capability.\n\nMust include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`.\nFor commands directly implemented in the application itself only `${permission-name}`\nis required.\n\n## Example\n\n```json\n[\n \"core:default\",\n \"shell:allow-open\",\n \"dialog:open\",\n {\n \"identifier\": \"fs:allow-write-text-file\",\n \"allow\": [{ \"path\": \"$HOME/test.txt\" }]\n }\n]\n```",
|
||
"type": "array",
|
||
"uniqueItems": true,
|
||
"items": {
|
||
"$ref": "#/definitions/PermissionEntry"
|
||
}
|
||
},
|
||
"platforms": {
|
||
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"$ref": "#/definitions/Target"
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"identifier",
|
||
"permissions"
|
||
]
|
||
},
|
||
"CapabilityRemote": {
|
||
"description": "Configuration for remote URLs that are associated with the capability.",
|
||
"type": "object",
|
||
"properties": {
|
||
"urls": {
|
||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev\n- \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"urls"
|
||
]
|
||
},
|
||
"PermissionEntry": {
|
||
"description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`]\nor an object that references a permission and extends its scope.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Reference a permission or permission set by identifier.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Identifier"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Reference a permission or permission set by identifier and extends its scope.",
|
||
"type": "object",
|
||
"properties": {
|
||
"identifier": {
|
||
"description": "Identifier of the permission or permission set.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Identifier"
|
||
}
|
||
]
|
||
},
|
||
"allow": {
|
||
"description": "Data that defines what is allowed by the scope.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"$ref": "#/definitions/Value"
|
||
}
|
||
},
|
||
"deny": {
|
||
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"$ref": "#/definitions/Value"
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"identifier"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"Identifier": {
|
||
"type": "string"
|
||
},
|
||
"Value": {
|
||
"description": "All supported ACL values.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Represents a null JSON value.",
|
||
"type": "null"
|
||
},
|
||
{
|
||
"description": "Represents a [`bool`].",
|
||
"type": "boolean"
|
||
},
|
||
{
|
||
"description": "Represents a valid ACL [`Number`].",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Number"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Represents a [`String`].",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "Represents a list of other [`Value`]s.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/Value"
|
||
}
|
||
},
|
||
{
|
||
"description": "Represents a map of [`String`] keys to [`Value`]s.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/Value"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"Number": {
|
||
"description": "A valid ACL number.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Represents an [`i64`].",
|
||
"type": "integer",
|
||
"format": "int64"
|
||
},
|
||
{
|
||
"description": "Represents a [`f64`].",
|
||
"type": "number",
|
||
"format": "double"
|
||
}
|
||
]
|
||
},
|
||
"Target": {
|
||
"description": "Platform target.",
|
||
"oneOf": [
|
||
{
|
||
"description": "MacOS.",
|
||
"type": "string",
|
||
"const": "macOS"
|
||
},
|
||
{
|
||
"description": "Windows.",
|
||
"type": "string",
|
||
"const": "windows"
|
||
},
|
||
{
|
||
"description": "Linux.",
|
||
"type": "string",
|
||
"const": "linux"
|
||
},
|
||
{
|
||
"description": "Android.",
|
||
"type": "string",
|
||
"const": "android"
|
||
},
|
||
{
|
||
"description": "iOS.",
|
||
"type": "string",
|
||
"const": "iOS"
|
||
}
|
||
]
|
||
},
|
||
"HeaderConfig": {
|
||
"description": "A struct, where the keys are some specific http header names.\n\nIf the values to those keys are defined, then they will be send as part of a response message.\nThis does not include error messages and ipc messages\n\n## Example configuration\n```javascript\n{\n //..\n app:{\n //..\n security: {\n headers: {\n \"Cross-Origin-Opener-Policy\": \"same-origin\",\n \"Cross-Origin-Embedder-Policy\": \"require-corp\",\n \"Timing-Allow-Origin\": [\n \"https://developer.mozilla.org\",\n \"https://example.com\",\n ],\n \"Access-Control-Expose-Headers\": \"Tauri-Custom-Header\",\n \"Tauri-Custom-Header\": {\n \"key1\": \"'value1' 'value2'\",\n \"key2\": \"'value3'\"\n }\n },\n csp: \"default-src 'self'; connect-src ipc: http://ipc.localhost\",\n }\n //..\n }\n //..\n}\n```\nIn this example `Cross-Origin-Opener-Policy` and `Cross-Origin-Embedder-Policy` are set to allow for the use of [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer).\nThe result is, that those headers are then set on every response sent via the `get_response` function in crates/tauri/src/protocol/tauri.rs.\nThe Content-Security-Policy header is defined separately, because it is also handled separately.\n\nFor the helloworld example, this config translates into those response headers:\n```http\naccess-control-allow-origin: http://tauri.localhost\naccess-control-expose-headers: Tauri-Custom-Header\ncontent-security-policy: default-src 'self'; connect-src ipc: http://ipc.localhost; script-src 'self' 'sha256-Wjjrs6qinmnr+tOry8x8PPwI77eGpUFR3EEGZktjJNs='\ncontent-type: text/html\ncross-origin-embedder-policy: require-corp\ncross-origin-opener-policy: same-origin\ntauri-custom-header: key1 'value1' 'value2'; key2 'value3'\ntiming-allow-origin: https://developer.mozilla.org, https://example.com\n```\nSince the resulting header values are always 'string-like'. So depending on the what data type the HeaderSource is, they need to be converted.\n - `String`(JS/Rust): stay the same for the resulting header value\n - `Array`(JS)/`Vec\\<String\\>`(Rust): Item are joined by \", \" for the resulting header value\n - `Object`(JS)/ `Hashmap\\<String,String\\>`(Rust): Items are composed from: key + space + value. Item are then joined by \"; \" for the resulting header value",
|
||
"type": "object",
|
||
"properties": {
|
||
"Access-Control-Allow-Credentials": {
|
||
"description": "The Access-Control-Allow-Credentials response header tells browsers whether the\nserver allows cross-origin HTTP requests to include credentials.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Access-Control-Allow-Headers": {
|
||
"description": "The Access-Control-Allow-Headers response header is used in response\nto a preflight request which includes the Access-Control-Request-Headers\nto indicate which HTTP headers can be used during the actual request.\n\nThis header is required if the request has an Access-Control-Request-Headers header.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Access-Control-Allow-Methods": {
|
||
"description": "The Access-Control-Allow-Methods response header specifies one or more methods\nallowed when accessing a resource in response to a preflight request.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Access-Control-Expose-Headers": {
|
||
"description": "The Access-Control-Expose-Headers response header allows a server to indicate\nwhich response headers should be made available to scripts running in the browser,\nin response to a cross-origin request.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Access-Control-Max-Age": {
|
||
"description": "The Access-Control-Max-Age response header indicates how long the results of a\npreflight request (that is the information contained in the\nAccess-Control-Allow-Methods and Access-Control-Allow-Headers headers) can\nbe cached.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Cross-Origin-Embedder-Policy": {
|
||
"description": "The HTTP Cross-Origin-Embedder-Policy (COEP) response header configures embedding\ncross-origin resources into the document.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Cross-Origin-Opener-Policy": {
|
||
"description": "The HTTP Cross-Origin-Opener-Policy (COOP) response header allows you to ensure a\ntop-level document does not share a browsing context group with cross-origin documents.\nCOOP will process-isolate your document and potential attackers can't access your global\nobject if they were to open it in a popup, preventing a set of cross-origin attacks dubbed XS-Leaks.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Cross-Origin-Resource-Policy": {
|
||
"description": "The HTTP Cross-Origin-Resource-Policy response header conveys a desire that the\nbrowser blocks no-cors cross-origin/cross-site requests to the given resource.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Permissions-Policy": {
|
||
"description": "The HTTP Permissions-Policy header provides a mechanism to allow and deny the\nuse of browser features in a document or within any \\<iframe\\> elements in the document.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Service-Worker-Allowed": {
|
||
"description": "The HTTP Service-Worker-Allowed response header is used to broaden the path restriction for a\nservice worker's default scope.\n\nBy default, the scope for a service worker registration is the directory where the service\nworker script is located. For example, if the script `sw.js` is located in `/js/sw.js`,\nit can only control URLs under `/js/` by default. Servers can use the `Service-Worker-Allowed`\nheader to allow a service worker to control URLs outside of its own directory.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Service-Worker-Allowed>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Timing-Allow-Origin": {
|
||
"description": "The Timing-Allow-Origin response header specifies origins that are allowed to see values\nof attributes retrieved via features of the Resource Timing API, which would otherwise be\nreported as zero due to cross-origin restrictions.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"X-Content-Type-Options": {
|
||
"description": "The X-Content-Type-Options response HTTP header is a marker used by the server to indicate\nthat the MIME types advertised in the Content-Type headers should be followed and not be\nchanged. The header allows you to avoid MIME type sniffing by saying that the MIME types\nare deliberately configured.\n\nSee <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"Tauri-Custom-Header": {
|
||
"description": "A custom header field Tauri-Custom-Header, don't use it.\nRemember to set Access-Control-Expose-Headers accordingly\n\n**NOT INTENDED FOR PRODUCTION USE**",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HeaderSource"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"HeaderSource": {
|
||
"description": "definition of a header source\n\nThe header value to a header name",
|
||
"anyOf": [
|
||
{
|
||
"description": "string version of the header Value",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "list version of the header value. Item are joined by \",\" for the real header value",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"description": "(Rust struct | Json | JavaScript Object) equivalent of the header value. Items are composed from: key + space + value. Item are then joined by \";\" for the real header value",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"TrayIconConfig": {
|
||
"description": "Configuration for application tray icon.\n\nSee more: <https://v2.tauri.app/reference/config/#trayiconconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"description": "Set an id for this tray icon so you can reference it later, defaults to `main`.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"iconPath": {
|
||
"description": "Path to the default icon to use for the tray icon.\n\nNote: this stores the image in raw pixels to the final binary,\nso keep the icon size (width and height) small\nor else it's going to bloat your final executable",
|
||
"type": "string"
|
||
},
|
||
"iconAsTemplate": {
|
||
"description": "A Boolean value that determines whether the image represents a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc) image on macOS.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"menuOnLeftClick": {
|
||
"description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n## Platform-specific:\n\n- **Linux**: Unsupported.",
|
||
"type": "boolean",
|
||
"deprecated": true,
|
||
"default": true
|
||
},
|
||
"showMenuOnLeftClick": {
|
||
"description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n## Platform-specific:\n\n- **Linux**: Unsupported.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"title": {
|
||
"description": "Title for MacOS tray",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"tooltip": {
|
||
"description": "Tray icon tooltip on Windows and macOS",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"iconPath"
|
||
]
|
||
},
|
||
"BuildConfig": {
|
||
"description": "The Build configuration object.\n\nSee more: <https://v2.tauri.app/reference/config/#buildconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"runner": {
|
||
"description": "The binary used to build and run the application.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/RunnerConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"devUrl": {
|
||
"description": "The URL to load in development.\n\nThis is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\nMost modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default.\n\nIf you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\nand point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "uri"
|
||
},
|
||
"frontendDist": {
|
||
"description": "The path to the application assets (usually the `dist` folder of your javascript bundler)\nor a URL that could be either a custom protocol registered in the tauri app (for example: `myprotocol://`)\nor a remote URL (for example: `https://site.com/app`).\n\nWhen a path relative to the configuration file is provided,\nit is read recursively and all files are embedded in the application binary.\nTauri then looks for an `index.html` and serves it as the default entry point for your application.\n\nYou can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary.\nIn this case, all files are added to the root and you must reference it that way in your HTML files.\n\nWhen a URL is provided, the application won't have bundled assets\nand the application will load that URL by default.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/FrontendDist"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"beforeDevCommand": {
|
||
"description": "A shell command to run before `tauri dev` kicks in.\n\nThe TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/BeforeDevCommand"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"beforeBuildCommand": {
|
||
"description": "A shell command to run before `tauri build` kicks in.\n\nThe TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HookCommand"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"beforeBundleCommand": {
|
||
"description": "A shell command to run before the bundling phase in `tauri build` kicks in.\n\nThe TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/HookCommand"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"features": {
|
||
"description": "Features passed to `cargo` commands.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"removeUnusedCommands": {
|
||
"description": "Try to remove unused commands registered from plugins base on the ACL list during `tauri build`,\nthe way it works is that tauri-cli will read this and set the environment variables for the build script and macros,\nand they'll try to get all the allowed commands and remove the rest\n\nNote:\n - This won't be accounting for dynamically added ACLs when you use features from the `dynamic-acl` (currently enabled by default) feature flag, so make sure to check it when using this\n - This feature requires tauri-plugin 2.1 and tauri 2.4",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"additionalWatchFolders": {
|
||
"description": "Additional paths to watch for changes when running `tauri dev`.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"RunnerConfig": {
|
||
"description": "The runner configuration.",
|
||
"anyOf": [
|
||
{
|
||
"description": "A string specifying the binary to run.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "An object with advanced configuration options.",
|
||
"type": "object",
|
||
"properties": {
|
||
"cmd": {
|
||
"description": "The binary to run.",
|
||
"type": "string"
|
||
},
|
||
"cwd": {
|
||
"description": "The current working directory to run the command from.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"args": {
|
||
"description": "Arguments to pass to the command.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"cmd"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"FrontendDist": {
|
||
"description": "Defines the URL or assets to embed in the application.",
|
||
"anyOf": [
|
||
{
|
||
"description": "An external URL that should be used as the default application URL. No assets are embedded in the app in this case.",
|
||
"type": "string",
|
||
"format": "uri"
|
||
},
|
||
{
|
||
"description": "Path to a directory containing the frontend dist assets.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "An array of files to embed in the app.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"BeforeDevCommand": {
|
||
"description": "Describes the shell command to run before `tauri dev`.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Run the given script with the default options.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "Run the given script with custom options.",
|
||
"type": "object",
|
||
"properties": {
|
||
"script": {
|
||
"description": "The script to execute.",
|
||
"type": "string"
|
||
},
|
||
"cwd": {
|
||
"description": "The current working directory.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"wait": {
|
||
"description": "Whether `tauri dev` should wait for the command to finish or not. Defaults to `false`.",
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
"required": [
|
||
"script"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"HookCommand": {
|
||
"description": "Describes a shell command to be executed when a CLI hook is triggered.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Run the given script with the default options.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "Run the given script with custom options.",
|
||
"type": "object",
|
||
"properties": {
|
||
"script": {
|
||
"description": "The script to execute.",
|
||
"type": "string"
|
||
},
|
||
"cwd": {
|
||
"description": "The current working directory.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"required": [
|
||
"script"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"BundleConfig": {
|
||
"description": "Configuration for tauri-bundler.\n\nSee more: <https://v2.tauri.app/reference/config/#bundleconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"active": {
|
||
"description": "Whether Tauri should bundle your application or just output the executable.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"targets": {
|
||
"description": "The bundle targets, currently supports [\"deb\", \"rpm\", \"appimage\", \"nsis\", \"msi\", \"app\", \"dmg\"] or \"all\".",
|
||
"default": "all",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/BundleTarget"
|
||
}
|
||
]
|
||
},
|
||
"createUpdaterArtifacts": {
|
||
"description": "Produce updaters and their signatures or not",
|
||
"default": false,
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Updater"
|
||
}
|
||
]
|
||
},
|
||
"publisher": {
|
||
"description": "The application's publisher. Defaults to the second element in the identifier string.\n\nCurrently maps to the Manufacturer property of the Windows Installer\nand the Maintainer field of debian packages if the Cargo.toml does not have the authors field.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"homepage": {
|
||
"description": "A url to the home page of your application. If unset, will\nfallback to `homepage` defined in `Cargo.toml`.\n\nSupported bundle targets: `deb`, `rpm`, `nsis` and `msi`.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"icon": {
|
||
"description": "The app's icons",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"resources": {
|
||
"description": "App resources to bundle.\nEach resource is a path to a file or directory.\nGlob patterns are supported.\n\n## Examples\n\nTo include a list of files:\n\n```json\n{\n \"bundle\": {\n \"resources\": [\n \"./path/to/some-file.txt\",\n \"/absolute/path/to/textfile.txt\",\n \"../relative/path/to/jsonfile.json\",\n \"some-folder/\",\n \"resources/**/*.md\"\n ]\n }\n}\n```\n\nThe bundled files will be in `$RESOURCES/` with the original directory structure preserved,\nfor example: `./path/to/some-file.txt` -> `$RESOURCE/path/to/some-file.txt`\n\nTo fine control where the files will get copied to, use a map instead\n\n```json\n{\n \"bundle\": {\n \"resources\": {\n \"/absolute/path/to/textfile.txt\": \"resources/textfile.txt\",\n \"relative/path/to/jsonfile.json\": \"resources/jsonfile.json\",\n \"resources/\": \"\",\n \"docs/**/*md\": \"website-docs/\"\n }\n }\n}\n```\n\nNote that when using glob pattern in this case, the original directory structure is not preserved,\neverything gets copied to the target directory directly\n\nSee more: <https://v2.tauri.app/develop/resources/>",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/BundleResources"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"copyright": {
|
||
"description": "A copyright string associated with your application.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"license": {
|
||
"description": "The package's license identifier to be included in the appropriate bundles.\nIf not set, defaults to the license from the Cargo.toml file.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"licenseFile": {
|
||
"description": "The path to the license file to be included in the appropriate bundles.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"category": {
|
||
"description": "The application kind.\n\nShould be one of the following:\nBusiness, 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.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"fileAssociations": {
|
||
"description": "File types to associate with the application.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"$ref": "#/definitions/FileAssociation"
|
||
}
|
||
},
|
||
"shortDescription": {
|
||
"description": "A short description of your application.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"longDescription": {
|
||
"description": "A longer, multi-line description of the application.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"useLocalToolsDir": {
|
||
"description": "Whether to use the project's `target` directory, for caching build tools (e.g., Wix and NSIS) when building this application. Defaults to `false`.\n\nIf true, tools will be cached in `target/.tauri/`.\nIf false, tools will be cached in the current user's platform-specific cache directory.\n\nAn example where it can be appropriate to set this to `true` is when building this application as a Windows System user (e.g., AWS EC2 workloads),\nbecause the Window system's app data directory is restricted.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"externalBin": {
|
||
"description": "A list of—either absolute or relative—paths to binaries to embed with your application.\n\nNote that Tauri will look for system-specific binaries following the pattern \"binary-name{-target-triple}{.system-extension}\".\n\nE.g. for the external binary \"my-binary\", Tauri looks for:\n\n- \"my-binary-x86_64-pc-windows-msvc.exe\" for Windows\n- \"my-binary-x86_64-apple-darwin\" for macOS\n- \"my-binary-x86_64-unknown-linux-gnu\" for Linux\n\nso don't forget to provide binaries for all targeted platforms.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"windows": {
|
||
"description": "Configuration for the Windows bundles.",
|
||
"default": {
|
||
"digestAlgorithm": null,
|
||
"certificateThumbprint": null,
|
||
"timestampUrl": null,
|
||
"tsp": false,
|
||
"webviewInstallMode": {
|
||
"type": "downloadBootstrapper",
|
||
"silent": true
|
||
},
|
||
"allowDowngrades": true,
|
||
"wix": null,
|
||
"nsis": null,
|
||
"signCommand": null
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/WindowsConfig"
|
||
}
|
||
]
|
||
},
|
||
"linux": {
|
||
"description": "Configuration for the Linux bundles.",
|
||
"default": {
|
||
"appimage": {
|
||
"bundleMediaFramework": false,
|
||
"files": {}
|
||
},
|
||
"deb": {
|
||
"files": {}
|
||
},
|
||
"rpm": {
|
||
"release": "1",
|
||
"epoch": 0,
|
||
"files": {}
|
||
}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/LinuxConfig"
|
||
}
|
||
]
|
||
},
|
||
"macOS": {
|
||
"description": "Configuration for the macOS bundles.",
|
||
"default": {
|
||
"files": {},
|
||
"minimumSystemVersion": "10.13",
|
||
"hardenedRuntime": true,
|
||
"dmg": {
|
||
"windowSize": {
|
||
"width": 660,
|
||
"height": 400
|
||
},
|
||
"appPosition": {
|
||
"x": 180,
|
||
"y": 170
|
||
},
|
||
"applicationFolderPosition": {
|
||
"x": 480,
|
||
"y": 170
|
||
}
|
||
}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/MacConfig"
|
||
}
|
||
]
|
||
},
|
||
"iOS": {
|
||
"description": "iOS configuration.",
|
||
"default": {
|
||
"minimumSystemVersion": "14.0"
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/IosConfig"
|
||
}
|
||
]
|
||
},
|
||
"android": {
|
||
"description": "Android configuration.",
|
||
"default": {
|
||
"minSdkVersion": 24,
|
||
"autoIncrementVersionCode": false
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/AndroidConfig"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"BundleTarget": {
|
||
"description": "Targets to bundle. Each value is case insensitive.",
|
||
"anyOf": [
|
||
{
|
||
"description": "Bundle all targets.",
|
||
"type": "string",
|
||
"const": "all"
|
||
},
|
||
{
|
||
"description": "A list of bundle targets.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/BundleType"
|
||
}
|
||
},
|
||
{
|
||
"description": "A single bundle target.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/BundleType"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"BundleType": {
|
||
"description": "A bundle referenced by tauri-bundler.",
|
||
"oneOf": [
|
||
{
|
||
"description": "The debian bundle (.deb).",
|
||
"type": "string",
|
||
"const": "deb"
|
||
},
|
||
{
|
||
"description": "The RPM bundle (.rpm).",
|
||
"type": "string",
|
||
"const": "rpm"
|
||
},
|
||
{
|
||
"description": "The AppImage bundle (.appimage).",
|
||
"type": "string",
|
||
"const": "appimage"
|
||
},
|
||
{
|
||
"description": "The Microsoft Installer bundle (.msi).",
|
||
"type": "string",
|
||
"const": "msi"
|
||
},
|
||
{
|
||
"description": "The NSIS bundle (.exe).",
|
||
"type": "string",
|
||
"const": "nsis"
|
||
},
|
||
{
|
||
"description": "The macOS application bundle (.app).",
|
||
"type": "string",
|
||
"const": "app"
|
||
},
|
||
{
|
||
"description": "The Apple Disk Image bundle (.dmg).",
|
||
"type": "string",
|
||
"const": "dmg"
|
||
}
|
||
]
|
||
},
|
||
"Updater": {
|
||
"description": "Updater type",
|
||
"anyOf": [
|
||
{
|
||
"description": "Generates legacy zipped v1 compatible updaters",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/V1Compatible"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"description": "Produce updaters and their signatures or not",
|
||
"type": "boolean"
|
||
}
|
||
]
|
||
},
|
||
"V1Compatible": {
|
||
"description": "Generates legacy zipped v1 compatible updaters",
|
||
"oneOf": [
|
||
{
|
||
"description": "Generates legacy zipped v1 compatible updaters",
|
||
"type": "string",
|
||
"const": "v1Compatible"
|
||
}
|
||
]
|
||
},
|
||
"BundleResources": {
|
||
"description": "Definition for bundle resources.\nCan be either a list of paths to include or a map of source to target paths.",
|
||
"anyOf": [
|
||
{
|
||
"description": "A list of paths to include.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"description": "A map of source to target paths.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"FileAssociation": {
|
||
"description": "File association",
|
||
"type": "object",
|
||
"properties": {
|
||
"ext": {
|
||
"description": "File extensions to associate with this app. e.g. 'png'",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/AssociationExt"
|
||
}
|
||
},
|
||
"contentTypes": {
|
||
"description": "Declare support to a file with the given content type. Maps to `LSItemContentTypes` on macOS.\n\nThis allows supporting any file format declared by another application that conforms to this type.\nDeclaration of new types can be done with [`Self::exported_type`] and linking to certain content types are done via [`ExportedFileAssociation::conforms_to`].",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"description": "The name. Maps to `CFBundleTypeName` on macOS. Default to `ext[0]`",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"description": {
|
||
"description": "The association description. Windows-only. It is displayed on the `Type` column on Windows Explorer.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"role": {
|
||
"description": "The app's role with respect to the type. Maps to `CFBundleTypeRole` on macOS.",
|
||
"default": "Editor",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/BundleTypeRole"
|
||
}
|
||
]
|
||
},
|
||
"mimeType": {
|
||
"description": "The mime-type e.g. 'image/png' or 'text/plain'. Linux-only.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"rank": {
|
||
"description": "The ranking of this app among apps that declare themselves as editors or viewers of the given file type. Maps to `LSHandlerRank` on macOS.",
|
||
"default": "Default",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/HandlerRank"
|
||
}
|
||
]
|
||
},
|
||
"exportedType": {
|
||
"description": "The exported type definition. Maps to a `UTExportedTypeDeclarations` entry on macOS.\n\nYou should define this if the associated file is a custom file type defined by your application.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/ExportedFileAssociation"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"ext"
|
||
]
|
||
},
|
||
"AssociationExt": {
|
||
"description": "An extension for a [`FileAssociation`].\n\nA leading `.` is automatically stripped.",
|
||
"type": "string"
|
||
},
|
||
"BundleTypeRole": {
|
||
"description": "macOS-only. Corresponds to CFBundleTypeRole",
|
||
"oneOf": [
|
||
{
|
||
"description": "CFBundleTypeRole.Editor. Files can be read and edited.",
|
||
"type": "string",
|
||
"const": "Editor"
|
||
},
|
||
{
|
||
"description": "CFBundleTypeRole.Viewer. Files can be read.",
|
||
"type": "string",
|
||
"const": "Viewer"
|
||
},
|
||
{
|
||
"description": "CFBundleTypeRole.Shell",
|
||
"type": "string",
|
||
"const": "Shell"
|
||
},
|
||
{
|
||
"description": "CFBundleTypeRole.QLGenerator",
|
||
"type": "string",
|
||
"const": "QLGenerator"
|
||
},
|
||
{
|
||
"description": "CFBundleTypeRole.None",
|
||
"type": "string",
|
||
"const": "None"
|
||
}
|
||
]
|
||
},
|
||
"HandlerRank": {
|
||
"description": "Corresponds to LSHandlerRank",
|
||
"oneOf": [
|
||
{
|
||
"description": "LSHandlerRank.Default. This app is an opener of files of this type; this value is also used if no rank is specified.",
|
||
"type": "string",
|
||
"const": "Default"
|
||
},
|
||
{
|
||
"description": "LSHandlerRank.Owner. This app is the primary creator of files of this type.",
|
||
"type": "string",
|
||
"const": "Owner"
|
||
},
|
||
{
|
||
"description": "LSHandlerRank.Alternate. This app is a secondary viewer of files of this type.",
|
||
"type": "string",
|
||
"const": "Alternate"
|
||
},
|
||
{
|
||
"description": "LSHandlerRank.None. This app is never selected to open files of this type, but it accepts drops of files of this type.",
|
||
"type": "string",
|
||
"const": "None"
|
||
}
|
||
]
|
||
},
|
||
"ExportedFileAssociation": {
|
||
"description": "The exported type definition. Maps to a `UTExportedTypeDeclarations` entry on macOS.",
|
||
"type": "object",
|
||
"properties": {
|
||
"identifier": {
|
||
"description": "The unique identifier for the exported type. Maps to `UTTypeIdentifier`.",
|
||
"type": "string"
|
||
},
|
||
"conformsTo": {
|
||
"description": "The types that this type conforms to. Maps to `UTTypeConformsTo`.\n\nExamples are `public.data`, `public.image`, `public.json` and `public.database`.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"identifier"
|
||
]
|
||
},
|
||
"WindowsConfig": {
|
||
"description": "Windows bundler configuration.\n\nSee more: <https://v2.tauri.app/reference/config/#windowsconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"digestAlgorithm": {
|
||
"description": "Specifies the file digest algorithm to use for creating file signatures.\nRequired for code signing. SHA-256 is recommended.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"certificateThumbprint": {
|
||
"description": "Specifies the SHA1 hash of the signing certificate.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"timestampUrl": {
|
||
"description": "Server to use during timestamping.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"tsp": {
|
||
"description": "Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may\nuse a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"webviewInstallMode": {
|
||
"description": "The installation mode for the Webview2 runtime.",
|
||
"default": {
|
||
"type": "downloadBootstrapper",
|
||
"silent": true
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/WebviewInstallMode"
|
||
}
|
||
]
|
||
},
|
||
"allowDowngrades": {
|
||
"description": "Validates a second app installation, blocking the user from installing an older version if set to `false`.\n\nFor instance, if `1.2.1` is installed, the user won't be able to install app version `1.2.0` or `1.1.5`.\n\nThe default value of this flag is `true`.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"wix": {
|
||
"description": "Configuration for the MSI generated with WiX.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/WixConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"nsis": {
|
||
"description": "Configuration for the installer generated with NSIS.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/NsisConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"signCommand": {
|
||
"description": "Specify a custom command to sign the binaries.\nThis command needs to have a `%1` in args which is just a placeholder for the binary path,\nwhich we will detect and replace before calling the command.\n\nBy Default we use `signtool.exe` which can be found only on Windows so\nif you are on another platform and want to cross-compile and sign you will\nneed to use another tool like `osslsigncode`.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/CustomSignCommandConfig"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"WebviewInstallMode": {
|
||
"description": "Install modes for the Webview2 runtime.\nNote that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\nFor more information see <https://v2.tauri.app/distribute/windows-installer/#webview2-installation-options>.",
|
||
"oneOf": [
|
||
{
|
||
"description": "Do not install the Webview2 as part of the Windows Installer.",
|
||
"type": "object",
|
||
"properties": {
|
||
"type": {
|
||
"type": "string",
|
||
"const": "skip"
|
||
}
|
||
},
|
||
"required": [
|
||
"type"
|
||
],
|
||
"additionalProperties": false
|
||
},
|
||
{
|
||
"description": "Download the bootstrapper and run it.\nRequires an internet connection.\nResults in a smaller installer size, but is not recommended on Windows 7.",
|
||
"type": "object",
|
||
"properties": {
|
||
"silent": {
|
||
"description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "downloadBootstrapper"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type"
|
||
]
|
||
},
|
||
{
|
||
"description": "Embed the bootstrapper and run it.\nRequires an internet connection.\nIncreases the installer size by around 1.8MB, but offers better support on Windows 7.",
|
||
"type": "object",
|
||
"properties": {
|
||
"silent": {
|
||
"description": "Instructs the installer to run the bootstrapper in silent mode. Defaults to `true`.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "embedBootstrapper"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type"
|
||
]
|
||
},
|
||
{
|
||
"description": "Embed the offline installer and run it.\nDoes not require an internet connection.\nIncreases the installer size by around 127MB.",
|
||
"type": "object",
|
||
"properties": {
|
||
"silent": {
|
||
"description": "Instructs the installer to run the installer in silent mode. Defaults to `true`.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "offlineInstaller"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type"
|
||
]
|
||
},
|
||
{
|
||
"description": "Embed a fixed webview2 version and use it at runtime.\nIncreases the installer size by around 180MB.",
|
||
"type": "object",
|
||
"properties": {
|
||
"path": {
|
||
"description": "The path to the fixed runtime to use.\n\nThe fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section).\nThe `.cab` file must be extracted to a folder and this folder path must be defined on this field.",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "fixedRuntime"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"path"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"WixConfig": {
|
||
"description": "Configuration for the MSI bundle using WiX.\n\nSee more: <https://v2.tauri.app/reference/config/#wixconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"version": {
|
||
"description": "MSI installer version in the format `major.minor.patch.build` (build is optional).\n\nBecause a valid version is required for MSI installer, it will be derived from [`Config::version`] if this field is not set.\n\nThe first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255.\nThe third and fourth fields have a maximum value of 65,535.\n\nSee <https://learn.microsoft.com/en-us/windows/win32/msi/productversion> for more info.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"upgradeCode": {
|
||
"description": "A GUID upgrade code for MSI installer. This code **_must stay the same across all of your updates_**,\notherwise, Windows will treat your update as a different app and your users will have duplicate versions of your app.\n\nBy default, tauri generates this code by generating a Uuid v5 using the string `<productName>.exe.app.x64` in the DNS namespace.\nYou can use Tauri's CLI to generate and print this code for you, run `tauri inspect wix-upgrade-code`.\n\nIt is recommended that you set this value in your tauri config file to avoid accidental changes in your upgrade code\nwhenever you want to change your product name.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"format": "uuid"
|
||
},
|
||
"language": {
|
||
"description": "The installer languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.",
|
||
"default": "en-US",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/WixLanguage"
|
||
}
|
||
]
|
||
},
|
||
"template": {
|
||
"description": "A custom .wxs template to use.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"fragmentPaths": {
|
||
"description": "A list of paths to .wxs files with WiX fragments to use.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"componentGroupRefs": {
|
||
"description": "The ComponentGroup element ids you want to reference from the fragments.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"componentRefs": {
|
||
"description": "The Component element ids you want to reference from the fragments.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"featureGroupRefs": {
|
||
"description": "The FeatureGroup element ids you want to reference from the fragments.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"featureRefs": {
|
||
"description": "The Feature element ids you want to reference from the fragments.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"mergeRefs": {
|
||
"description": "The Merge element ids you want to reference from the fragments.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"default": []
|
||
},
|
||
"enableElevatedUpdateTask": {
|
||
"description": "Create an elevated update task within Windows Task Scheduler.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"bannerPath": {
|
||
"description": "Path to a bitmap file to use as the installation user interface banner.\nThis bitmap will appear at the top of all but the first page of the installer.\n\nThe required dimensions are 493px × 58px.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"dialogImagePath": {
|
||
"description": "Path to a bitmap file to use on the installation user interface dialogs.\nIt is used on the welcome and completion dialogs.\n\nThe required dimensions are 493px × 312px.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"fipsCompliant": {
|
||
"description": "Enables FIPS compliant algorithms.\nCan also be enabled via the `TAURI_BUNDLER_WIX_FIPS_COMPLIANT` env var.",
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"WixLanguage": {
|
||
"description": "The languages to build using WiX.",
|
||
"anyOf": [
|
||
{
|
||
"description": "A single language to build, without configuration.",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "A list of languages to build, without configuration.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"description": "A map of languages and its configuration.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/WixLanguageConfig"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"WixLanguageConfig": {
|
||
"description": "Configuration for a target language for the WiX build.\n\nSee more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"localePath": {
|
||
"description": "The path to a locale (`.wxl`) file. See <https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/build_a_localized_version.html>.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"NsisConfig": {
|
||
"description": "Configuration for the Installer bundle using NSIS.",
|
||
"type": "object",
|
||
"properties": {
|
||
"template": {
|
||
"description": "A custom .nsi template to use.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"headerImage": {
|
||
"description": "The path to a bitmap file to display on the header of installers pages.\n\nThe recommended dimensions are 150px x 57px.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"sidebarImage": {
|
||
"description": "The path to a bitmap file for the Welcome page and the Finish page.\n\nThe recommended dimensions are 164px x 314px.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"installerIcon": {
|
||
"description": "The path to an icon file used as the installer icon.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"installMode": {
|
||
"description": "Whether the installation will be for all users or just the current user.",
|
||
"default": "currentUser",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/NSISInstallerMode"
|
||
}
|
||
]
|
||
},
|
||
"languages": {
|
||
"description": "A list of installer languages.\nBy default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\nTo allow the user to select the language, set `display_language_selector` to `true`.\n\nSee <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"customLanguageFiles": {
|
||
"description": "A key-value pair where the key is the language and the\nvalue is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\nSee <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsh` file.\n\n**Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
|
||
"type": [
|
||
"object",
|
||
"null"
|
||
],
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"displayLanguageSelector": {
|
||
"description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not.\nBy default the OS language is selected, with a fallback to the first language in the `languages` array.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"compression": {
|
||
"description": "Set the compression algorithm used to compress files in the installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
|
||
"default": "lzma",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/NsisCompression"
|
||
}
|
||
]
|
||
},
|
||
"startMenuFolder": {
|
||
"description": "Set the folder name for the start menu shortcut.\n\nUse this option if you have multiple apps and wish to group their shortcuts under one folder\nor if you generally prefer to set your shortcut inside a folder.\n\nExamples:\n- `AwesomePublisher`, shortcut will be placed in `%AppData%\\Microsoft\\Windows\\Start Menu\\Programs\\AwesomePublisher\\<your-app>.lnk`\n- If unset, shortcut will be placed in `%AppData%\\Microsoft\\Windows\\Start Menu\\Programs\\<your-app>.lnk`",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"installerHooks": {
|
||
"description": "A path to a `.nsh` file that contains special NSIS macros to be hooked into the\nmain installer.nsi script.\n\nSupported hooks are:\n\n- `NSIS_HOOK_PREINSTALL`: This hook runs before copying files, setting registry key values and creating shortcuts.\n- `NSIS_HOOK_POSTINSTALL`: This hook runs after the installer has finished copying all files, setting the registry keys and created shortcuts.\n- `NSIS_HOOK_PREUNINSTALL`: This hook runs before removing any files, registry keys and shortcuts.\n- `NSIS_HOOK_POSTUNINSTALL`: This hook runs after files, registry keys and shortcuts have been removed.\n\n### Example\n\n```nsh\n!macro NSIS_HOOK_PREINSTALL\n MessageBox MB_OK \"PreInstall\"\n!macroend\n\n!macro NSIS_HOOK_POSTINSTALL\n MessageBox MB_OK \"PostInstall\"\n!macroend\n\n!macro NSIS_HOOK_PREUNINSTALL\n MessageBox MB_OK \"PreUnInstall\"\n!macroend\n\n!macro NSIS_HOOK_POSTUNINSTALL\n MessageBox MB_OK \"PostUninstall\"\n!macroend\n```",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"minimumWebview2Version": {
|
||
"description": "Try to ensure that the WebView2 version is equal to or newer than this version,\nif the user's WebView2 is older than this version,\nthe installer will try to trigger a WebView2 update.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"NSISInstallerMode": {
|
||
"description": "Install Modes for the NSIS installer.",
|
||
"oneOf": [
|
||
{
|
||
"description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.",
|
||
"type": "string",
|
||
"const": "currentUser"
|
||
},
|
||
{
|
||
"description": "Install the app by default in the `Program Files` folder directory requires Administrator\naccess for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.",
|
||
"type": "string",
|
||
"const": "perMachine"
|
||
},
|
||
{
|
||
"description": "Combines both modes and allows the user to choose at install time\nwhether to install for the current user or per machine. Note that this mode\nwill require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.",
|
||
"type": "string",
|
||
"const": "both"
|
||
}
|
||
]
|
||
},
|
||
"NsisCompression": {
|
||
"description": "Compression algorithms used in the NSIS installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
|
||
"oneOf": [
|
||
{
|
||
"description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.",
|
||
"type": "string",
|
||
"const": "zlib"
|
||
},
|
||
{
|
||
"description": "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.",
|
||
"type": "string",
|
||
"const": "bzip2"
|
||
},
|
||
{
|
||
"description": "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.",
|
||
"type": "string",
|
||
"const": "lzma"
|
||
},
|
||
{
|
||
"description": "Disable compression",
|
||
"type": "string",
|
||
"const": "none"
|
||
}
|
||
]
|
||
},
|
||
"CustomSignCommandConfig": {
|
||
"description": "Custom Signing Command configuration.",
|
||
"anyOf": [
|
||
{
|
||
"description": "A string notation of the script to execute.\n\n\"%1\" will be replaced with the path to the binary to be signed.\n\nThis is a simpler notation for the command.\nTauri will split the string with `' '` and use the first element as the command name and the rest as arguments.\n\nIf you need to use whitespace in the command or arguments, use the object notation [`Self::CommandWithOptions`].",
|
||
"type": "string"
|
||
},
|
||
{
|
||
"description": "An object notation of the command.\n\nThis is more complex notation for the command but\nthis allows you to use whitespace in the command and arguments.",
|
||
"type": "object",
|
||
"properties": {
|
||
"cmd": {
|
||
"description": "The command to run to sign the binary.",
|
||
"type": "string"
|
||
},
|
||
"args": {
|
||
"description": "The arguments to pass to the command.\n\n\"%1\" will be replaced with the path to the binary to be signed.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"cmd",
|
||
"args"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"LinuxConfig": {
|
||
"description": "Configuration for Linux bundles.\n\nSee more: <https://v2.tauri.app/reference/config/#linuxconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"appimage": {
|
||
"description": "Configuration for the AppImage bundle.",
|
||
"default": {
|
||
"bundleMediaFramework": false,
|
||
"files": {}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/AppImageConfig"
|
||
}
|
||
]
|
||
},
|
||
"deb": {
|
||
"description": "Configuration for the Debian bundle.",
|
||
"default": {
|
||
"files": {}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/DebConfig"
|
||
}
|
||
]
|
||
},
|
||
"rpm": {
|
||
"description": "Configuration for the RPM bundle.",
|
||
"default": {
|
||
"release": "1",
|
||
"epoch": 0,
|
||
"files": {}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/RpmConfig"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"AppImageConfig": {
|
||
"description": "Configuration for AppImage bundles.\n\nSee more: <https://v2.tauri.app/reference/config/#appimageconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"bundleMediaFramework": {
|
||
"description": "Include additional gstreamer dependencies needed for audio and video playback.\nThis increases the bundle size by ~15-35MB depending on your build system.",
|
||
"type": "boolean",
|
||
"default": false
|
||
},
|
||
"files": {
|
||
"description": "The files to include in the Appimage Binary.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
},
|
||
"default": {}
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"DebConfig": {
|
||
"description": "Configuration for Debian (.deb) bundles.\n\nSee more: <https://v2.tauri.app/reference/config/#debconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"depends": {
|
||
"description": "The list of deb dependencies your application relies on.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"recommends": {
|
||
"description": "The list of deb dependencies your application recommends.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"provides": {
|
||
"description": "The list of dependencies the package provides.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"conflicts": {
|
||
"description": "The list of package conflicts.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"replaces": {
|
||
"description": "The list of package replaces.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"files": {
|
||
"description": "The files to include on the package.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
},
|
||
"default": {}
|
||
},
|
||
"section": {
|
||
"description": "Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"priority": {
|
||
"description": "Change the priority of the Debian Package. By default, it is set to `optional`.\nRecognized Priorities as of now are : `required`, `important`, `standard`, `optional`, `extra`",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"changelog": {
|
||
"description": "Path of the uncompressed Changelog file, to be stored at /usr/share/doc/package-name/changelog.gz. See\n<https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"desktopTemplate": {
|
||
"description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"preInstallScript": {
|
||
"description": "Path to script that will be executed before the package is unpacked. See\n<https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"postInstallScript": {
|
||
"description": "Path to script that will be executed after the package is unpacked. See\n<https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"preRemoveScript": {
|
||
"description": "Path to script that will be executed before the package is removed. See\n<https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"postRemoveScript": {
|
||
"description": "Path to script that will be executed after the package is removed. See\n<https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"RpmConfig": {
|
||
"description": "Configuration for RPM bundles.",
|
||
"type": "object",
|
||
"properties": {
|
||
"depends": {
|
||
"description": "The list of RPM dependencies your application relies on.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"recommends": {
|
||
"description": "The list of RPM dependencies your application recommends.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"provides": {
|
||
"description": "The list of RPM dependencies your application provides.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"conflicts": {
|
||
"description": "The list of RPM dependencies your application conflicts with. They must not be present\nin order for the package to be installed.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"obsoletes": {
|
||
"description": "The list of RPM dependencies your application supersedes - if this package is installed,\npackages listed as \"obsoletes\" will be automatically removed (if they are present).",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"release": {
|
||
"description": "The RPM release tag.",
|
||
"type": "string",
|
||
"default": "1"
|
||
},
|
||
"epoch": {
|
||
"description": "The RPM epoch.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0,
|
||
"default": 0
|
||
},
|
||
"files": {
|
||
"description": "The files to include on the package.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
},
|
||
"default": {}
|
||
},
|
||
"desktopTemplate": {
|
||
"description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"preInstallScript": {
|
||
"description": "Path to script that will be executed before the package is unpacked. See\n<http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"postInstallScript": {
|
||
"description": "Path to script that will be executed after the package is unpacked. See\n<http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"preRemoveScript": {
|
||
"description": "Path to script that will be executed before the package is removed. See\n<http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"postRemoveScript": {
|
||
"description": "Path to script that will be executed after the package is removed. See\n<http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"compression": {
|
||
"description": "Compression algorithm and level. Defaults to `Gzip` with level 6.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/RpmCompression"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"RpmCompression": {
|
||
"description": "Compression algorithms used when bundling RPM packages.",
|
||
"oneOf": [
|
||
{
|
||
"description": "Gzip compression",
|
||
"type": "object",
|
||
"properties": {
|
||
"level": {
|
||
"description": "Gzip compression level",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "gzip"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"level"
|
||
]
|
||
},
|
||
{
|
||
"description": "Zstd compression",
|
||
"type": "object",
|
||
"properties": {
|
||
"level": {
|
||
"description": "Zstd compression level",
|
||
"type": "integer",
|
||
"format": "int32"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "zstd"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"level"
|
||
]
|
||
},
|
||
{
|
||
"description": "Xz compression",
|
||
"type": "object",
|
||
"properties": {
|
||
"level": {
|
||
"description": "Xz compression level",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "xz"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"level"
|
||
]
|
||
},
|
||
{
|
||
"description": "Bzip2 compression",
|
||
"type": "object",
|
||
"properties": {
|
||
"level": {
|
||
"description": "Bzip2 compression level",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"const": "bzip2"
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"type",
|
||
"level"
|
||
]
|
||
},
|
||
{
|
||
"description": "Disable compression",
|
||
"type": "object",
|
||
"properties": {
|
||
"type": {
|
||
"type": "string",
|
||
"const": "none"
|
||
}
|
||
},
|
||
"required": [
|
||
"type"
|
||
],
|
||
"additionalProperties": false
|
||
}
|
||
]
|
||
},
|
||
"MacConfig": {
|
||
"description": "Configuration for the macOS bundles.\n\nSee more: <https://v2.tauri.app/reference/config/#macconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"frameworks": {
|
||
"description": "A list of strings indicating any macOS X frameworks that need to be bundled with the application.\n\nIf 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.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"files": {
|
||
"description": "The files to include in the application relative to the Contents directory.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
},
|
||
"default": {}
|
||
},
|
||
"bundleVersion": {
|
||
"description": "The version of the build that identifies an iteration of the bundle.\n\nTranslates to the bundle's CFBundleVersion property.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"bundleName": {
|
||
"description": "The name of the builder that built the bundle.\n\nTranslates to the bundle's CFBundleName property.\n\nIf not set, defaults to the package's product name.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"minimumSystemVersion": {
|
||
"description": "A version string indicating the minimum macOS X version that the bundled application supports. Defaults to `10.13`.\n\nSetting it to `null` completely removes the `LSMinimumSystemVersion` field on the bundle's `Info.plist`\nand the `MACOSX_DEPLOYMENT_TARGET` environment variable.\n\nIgnored in `tauri dev`.\n\nAn empty string is considered an invalid value so the default value is used.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
],
|
||
"default": "10.13"
|
||
},
|
||
"exceptionDomain": {
|
||
"description": "Allows your application to communicate with the outside world.\nIt should be a lowercase, without port and protocol domain name.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"signingIdentity": {
|
||
"description": "Identity to use for code signing.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"hardenedRuntime": {
|
||
"description": "Whether the codesign should enable [hardened runtime](https://developer.apple.com/documentation/security/hardened_runtime) (for executables) or not.",
|
||
"type": "boolean",
|
||
"default": true
|
||
},
|
||
"providerShortName": {
|
||
"description": "Provider short name for notarization.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"entitlements": {
|
||
"description": "Path to the entitlements file.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"infoPlist": {
|
||
"description": "Path to a Info.plist file to merge with the default Info.plist.\n\nNote that Tauri also looks for a `Info.plist` file in the same directory as the Tauri configuration file.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"dmg": {
|
||
"description": "DMG-specific settings.",
|
||
"default": {
|
||
"windowSize": {
|
||
"width": 660,
|
||
"height": 400
|
||
},
|
||
"appPosition": {
|
||
"x": 180,
|
||
"y": 170
|
||
},
|
||
"applicationFolderPosition": {
|
||
"x": 480,
|
||
"y": 170
|
||
}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/DmgConfig"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"DmgConfig": {
|
||
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\nSee more: <https://v2.tauri.app/reference/config/#dmgconfig>",
|
||
"type": "object",
|
||
"properties": {
|
||
"background": {
|
||
"description": "Image to use as the background in dmg file. Accepted formats: `png`/`jpg`/`gif`.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"windowPosition": {
|
||
"description": "Position of volume window on screen.",
|
||
"anyOf": [
|
||
{
|
||
"$ref": "#/definitions/Position"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
]
|
||
},
|
||
"windowSize": {
|
||
"description": "Size of volume window.",
|
||
"default": {
|
||
"width": 660,
|
||
"height": 400
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Size"
|
||
}
|
||
]
|
||
},
|
||
"appPosition": {
|
||
"description": "Position of app file on window.",
|
||
"default": {
|
||
"x": 180,
|
||
"y": 170
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Position"
|
||
}
|
||
]
|
||
},
|
||
"applicationFolderPosition": {
|
||
"description": "Position of application folder on window.",
|
||
"default": {
|
||
"x": 480,
|
||
"y": 170
|
||
},
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/Position"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"Position": {
|
||
"description": "Position coordinates struct.",
|
||
"type": "object",
|
||
"properties": {
|
||
"x": {
|
||
"description": "X coordinate.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"y": {
|
||
"description": "Y coordinate.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"x",
|
||
"y"
|
||
]
|
||
},
|
||
"Size": {
|
||
"description": "Size of the window.",
|
||
"type": "object",
|
||
"properties": {
|
||
"width": {
|
||
"description": "Width of the window.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
},
|
||
"height": {
|
||
"description": "Height of the window.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"required": [
|
||
"width",
|
||
"height"
|
||
]
|
||
},
|
||
"IosConfig": {
|
||
"description": "General configuration for the iOS target.",
|
||
"type": "object",
|
||
"properties": {
|
||
"template": {
|
||
"description": "A custom [XcodeGen] project.yml template to use.\n\n[XcodeGen]: <https://github.com/yonaskolb/XcodeGen>",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"frameworks": {
|
||
"description": "A list of strings indicating any iOS frameworks that need to be bundled with the application.\n\nNote that you need to recreate the iOS project for the changes to be applied.",
|
||
"type": [
|
||
"array",
|
||
"null"
|
||
],
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"developmentTeam": {
|
||
"description": "The development team. This value is required for iOS development because code signing is enforced.\nThe `APPLE_DEVELOPMENT_TEAM` environment variable can be set to overwrite it.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"bundleVersion": {
|
||
"description": "The version of the build that identifies an iteration of the bundle.\n\nTranslates to the bundle's CFBundleVersion property.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
},
|
||
"minimumSystemVersion": {
|
||
"description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`.\n\nMaps to the IPHONEOS_DEPLOYMENT_TARGET value.",
|
||
"type": "string",
|
||
"default": "14.0"
|
||
},
|
||
"infoPlist": {
|
||
"description": "Path to a Info.plist file to merge with the default Info.plist.\n\nNote that Tauri also looks for a `Info.plist` and `Info.ios.plist` file in the same directory as the Tauri configuration file.",
|
||
"type": [
|
||
"string",
|
||
"null"
|
||
]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"AndroidConfig": {
|
||
"description": "General configuration for the Android target.",
|
||
"type": "object",
|
||
"properties": {
|
||
"minSdkVersion": {
|
||
"description": "The minimum API level required for the application to run.\nThe Android system will prevent the user from installing the application if the system's API level is lower than the value specified.",
|
||
"type": "integer",
|
||
"format": "uint32",
|
||
"minimum": 0,
|
||
"default": 24
|
||
},
|
||
"versionCode": {
|
||
"description": "The version code of the application.\nIt is limited to 2,100,000,000 as per Google Play Store requirements.\n\nBy default we use your configured version and perform the following math:\nversionCode = version.major * 1000000 + version.minor * 1000 + version.patch",
|
||
"type": [
|
||
"integer",
|
||
"null"
|
||
],
|
||
"format": "uint32",
|
||
"minimum": 1,
|
||
"maximum": 2100000000
|
||
},
|
||
"autoIncrementVersionCode": {
|
||
"description": "Whether to automatically increment the `versionCode` on each build.\n\n- If `true`, the generator will try to read the last `versionCode` from\n `tauri.properties` and increment it by 1 for every build.\n- If `false` or not set, it falls back to `version_code` or semver-derived logic.\n\nNote that to use this feature, you should remove `/tauri.properties` from `src-tauri/gen/android/app/.gitignore` so the current versionCode is committed to the repository.",
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"PluginConfig": {
|
||
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\nSee more: <https://v2.tauri.app/reference/config/#pluginconfig>",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
} |