Skip to content

Commit d710946

Browse files
authored
refactor: move Linux custom protocol headers support behind feature flag (#5683)
1 parent 15ebeb1 commit d710946

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

.changes/linux-headers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Moved the custom protocol headers support on Linux behind the `linux-protocol-headers` Cargo feature to enhance compatibility with older Linux distributions.

.github/workflows/lint-fmt-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
clippy:
5151
- { args: '', key: 'empty' }
5252
- {
53-
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart',
53+
args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart',
5454
key: 'all'
5555
}
5656
- { args: '--features custom-protocol', key: 'custom-protocol' }

.github/workflows/test-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
key: api-all
5757
}
5858
- {
59-
args: --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
59+
args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
6060
key: all
6161
}
6262

core/tauri-runtime-wry/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exclude = [ "CHANGELOG.md", "/target" ]
1313
readme = "README.md"
1414

1515
[dependencies]
16-
wry = { version = "0.22", default-features = false, features = [ "file-drop", "protocol" ] }
16+
wry = { version = "0.22.4", default-features = false, features = [ "file-drop", "protocol" ] }
1717
tauri-runtime = { version = "0.12.0", path = "../tauri-runtime" }
1818
tauri-utils = { version = "1.2.0", path = "../tauri-utils" }
1919
uuid = { version = "1", features = [ "v4" ] }
@@ -47,3 +47,4 @@ macos-private-api = [
4747
objc-exception = [ "wry/objc-exception" ]
4848
global-shortcut = [ "tauri-runtime/global-shortcut" ]
4949
clipboard = [ "tauri-runtime/clipboard" ]
50+
linux-headers = ["wry/linux-headers"]

core/tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ default = [ "wry", "compression", "objc-exception" ]
129129
compression = [ "tauri-macros/compression", "tauri-utils/compression" ]
130130
wry = [ "tauri-runtime-wry" ]
131131
objc-exception = [ "tauri-runtime-wry/objc-exception" ]
132+
linux-protocol-headers = [ "tauri-runtime-wry/linux-headers" ]
132133
isolation = [ "tauri-utils/isolation", "tauri-macros/isolation" ]
133134
custom-protocol = [ "tauri-macros/custom-protocol" ]
134135
updater = [

core/tauri/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//! - **wry** *(enabled by default)*: Enables the [wry](https://github.com/tauri-apps/wry) runtime. Only disable it if you want a custom runtime.
1414
//! - **dox**: Internal feature to generate Rust documentation without linking on Linux.
1515
//! - **objc-exception**: Wrap each msg_send! in a @try/@catch and panics if an exception is caught, preventing Objective-C from unwinding into Rust.
16+
//! - **linux-protocol-headers**: Enables headers support for custom protocol requests on Linux. Requires webkit2gtk v2.36 or above.
1617
//! - **isolation**: Enables the isolation pattern. Enabled by default if the `tauri > pattern > use` config option is set to `isolation` on the `tauri.conf.json` file.
1718
//! - **custom-protocol**: Feature managed by the Tauri CLI. When enabled, Tauri assumes a production environment instead of a development one.
1819
//! - **updater**: Enables the application auto updater. Enabled by default if the `updater` config is defined on the `tauri.conf.json` file.

0 commit comments

Comments
 (0)