diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5ff839041..d8384eb91 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -52,6 +52,7 @@ dependencies = [ "reqwest 0.12.28", "reqwest 0.13.2", "rgb", + "rustls", "serde", "serde_bytes", "serde_json", @@ -476,28 +477,6 @@ dependencies = [ "arrayvec", ] -[[package]] -name = "aws-lc-rs" -version = "1.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f" -dependencies = [ - "aws-lc-sys", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", -] - [[package]] name = "backtrace" version = "0.3.76" @@ -872,15 +851,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - [[package]] name = "codespan-reporting" version = "0.12.0" @@ -1781,12 +1751,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "futf" version = "0.1.5" @@ -2597,6 +2561,22 @@ dependencies = [ "webpki-roots 1.0.7", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.20" @@ -5150,7 +5130,6 @@ version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ - "aws-lc-rs", "bytes", "getrandom 0.3.4", "lru-slab", @@ -5610,13 +5589,14 @@ dependencies = [ "http-body-util", "hyper", "hyper-rustls", + "hyper-tls", "hyper-util", "js-sys", "log", "mime_guess", + "native-tls", "percent-encoding", "pin-project-lite", - "quinn", "rustls", "rustls-pki-types", "rustls-platform-verifier", @@ -5624,6 +5604,7 @@ dependencies = [ "serde_json", "sync_wrapper", "tokio", + "tokio-native-tls", "tokio-rustls", "tokio-util", "tower", @@ -5758,7 +5739,6 @@ version = "0.23.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" dependencies = [ - "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", @@ -5822,7 +5802,6 @@ version = "0.103.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -7213,6 +7192,16 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.26.4" @@ -7231,9 +7220,11 @@ checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", + "native-tls", "rustls", "rustls-pki-types", "tokio", + "tokio-native-tls", "tokio-rustls", "tungstenite", "webpki-roots 0.26.11", @@ -7506,6 +7497,7 @@ dependencies = [ "http", "httparse", "log", + "native-tls", "rand 0.9.4", "rustls", "rustls-pki-types", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2072d198f..78bd17825 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -12,7 +12,6 @@ crate-type = ["staticlib", "cdylib", "rlib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tauri = { version = "2.10", features = [ "macos-private-api", "rustls-tls" ] } tauri-plugin-dialog = "2.6.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -34,7 +33,6 @@ walkdir = "2.5.0" imageproc = "0.26.1" ort = { version = "=2.0.0-rc.10", features = ["ndarray", "load-dynamic"] } ndarray = "0.16" -tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] } futures-util = "0.3" tauri-plugin-process = "2.3.1" tauri-plugin-os = "2.3.2" @@ -73,12 +71,17 @@ imgref = "1.12.0" [target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies] trash = "5.2.5" tauri-plugin-single-instance = "2.4.0" -reqwest = { version = "0.13", default-features = false, features = ["json", "multipart", "rustls"] } +tauri = { version = "2.10", features = ["macos-private-api", "native-tls"] } +reqwest = { version = "0.13", default-features = false, features = ["json", "multipart", "native-tls"] } +tokio-tungstenite = { version = "0.28", features = ["native-tls"] } [target.'cfg(target_os = "android")'.dependencies] ndk-context = "0.1" jni = "0.21" +tauri = { version = "2.10", features = ["macos-private-api", "rustls-tls"] } reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls-webpki-roots"] } +tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] } +rustls = { version = "0.23", default-features = false, features = ["ring", "std"] } include_dir = "0.7.3" [target.'cfg(target_os = "linux")'.dependencies] @@ -88,7 +91,7 @@ webkit2gtk = "=2.0.2" [build-dependencies] tauri-build = { version = "2.5", features = [] } sha2 = "0.10" -reqwest = { version = "0.13", default-features = false, features = ["blocking", "rustls"] } +reqwest = { version = "0.13", default-features = false, features = ["blocking", "native-tls"] } hex = "0.4" [profile.dev] diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 5d91a7191..a82bdac4f 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -4806,6 +4806,11 @@ fn frontend_ready( #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { + #[cfg(target_os = "android")] + rustls::crypto::ring::default_provider() + .install_default() + .expect("failed to install ring as the default rustls crypto provider"); + let mut builder = tauri::Builder::default(); #[cfg(not(any(target_os = "android", target_os = "ios")))]