From 9de1b0022099dba2b57eed727171a1e5537ce9a4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:56:27 +0000 Subject: [PATCH] Fix android cross compilation by replacing rustls with native-tls Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- Cargo.lock | 118 +++++++++++++++++++++++++++++++ cli/Cargo.toml | 2 +- stdlib/Cargo.toml | 2 +- tools/package-manager/Cargo.toml | 2 +- 4 files changed, 121 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b1fe064f..f631e122 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1004,6 +1004,16 @@ dependencies = [ "rustversion", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -1579,6 +1589,21 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -2572,6 +2597,23 @@ dependencies = [ "pxfm", ] +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log 0.4.33", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.9.0" @@ -2821,6 +2863,49 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" +[[package]] +name = "openssl" +version = "0.10.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" +dependencies = [ + "bitflags 2.13.1", + "cfg-if", + "foreign-types", + "libc", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "openssl-probe" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e036b411754132fd6b74e94b74e9a13c5cf606fa93d1885c35860d3060820b1" + +[[package]] +name = "openssl-sys" +version = "0.9.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -3671,12 +3756,44 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.1", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.28" @@ -4829,6 +4946,7 @@ dependencies = [ "base64 0.22.1", "flate2", "log 0.4.33", + "native-tls", "once_cell", "rustls", "rustls-pki-types", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 265b84c3..234d2883 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -54,7 +54,7 @@ indexmap = { workspace = true } bincode = "1.3.3" dirs = "7.0" num_cpus = "1.15" -ureq = "2.10" +ureq = { version = "2.10", features = ["native-tls"] } rayon = "1.12.0" rusqlite = { version = "0.40", features = ["bundled"] } diff --git a/stdlib/Cargo.toml b/stdlib/Cargo.toml index 7cd87e94..470cf961 100644 --- a/stdlib/Cargo.toml +++ b/stdlib/Cargo.toml @@ -10,7 +10,7 @@ techscript_runtime = { path = "../runtime/runtime" } serde_json = { workspace = true } serde = { workspace = true } indexmap = { version = "2", features = ["serde"] } -ureq = { version = "2.10", features = ["json"] } +ureq = { version = "2.10", features = ["json", "native-tls"] } toml = { workspace = true } rusqlite = { version = "0.40", features = ["bundled"] } md5 = "0.8" diff --git a/tools/package-manager/Cargo.toml b/tools/package-manager/Cargo.toml index d1532b18..4f1f7c3b 100644 --- a/tools/package-manager/Cargo.toml +++ b/tools/package-manager/Cargo.toml @@ -10,7 +10,7 @@ serde = { workspace = true } serde_json = { workspace = true } toml = "1.1" anyhow = { workspace = true } -ureq = "2.10" +ureq = { version = "2.10", features = ["native-tls"] } [[bench]] name = "capability_validation_bench"