Skip to content

Commit c74a105

Browse files
Android evaluation
1 parent c225ba4 commit c74a105

3 files changed

Lines changed: 184 additions & 3 deletions

File tree

.dump/3b8614ff-430b-11f1-8a44-42010aa60fd6.json

Lines changed: 10 additions & 0 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 159 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,30 @@ exclude = [
1717
name = "gvm"
1818
path = "src/main.rs"
1919

20+
# ── Shared dependencies (all platforms) ────────────────────────────────────────
2021
[dependencies]
2122
tokio = { version = "1", features = ["full"] }
2223
clap = { version = "4", features = ["derive", "env"] }
2324
anyhow = "1"
2425
thiserror = "2"
25-
reqwest = { version = "0.13", features = ["json", "rustls"] }
2626
serde = { version = "1", features = ["derive"] }
2727
serde_json = "1"
2828
gcp_auth = "0.12"
2929
colored = "3"
3030
google-cloud-auth = "1.9.0"
3131
google-cloud-compute-v1 = "2.4.0"
3232
google-cloud-gax = "1.9.1"
33-
rustls-platform-verifier = "0.7.0"
33+
34+
# ── TLS — non-Android platforms: reqwest with rustls ───────────────────────────
35+
# rustls-platform-verifier works correctly on Linux, macOS, and Windows because
36+
# those targets never call into a JVM.
37+
[target.'cfg(not(target_os = "android"))'.dependencies]
38+
reqwest = { version = "0.13", features = ["json", "rustls"] }
39+
40+
# ── TLS — Android (Termux CLI binary) ─────────────────────────────────────────
41+
# rustls-platform-verifier requires a live Java VM and an Android Context object
42+
# obtained through JNI. A Termux process has neither; initialising the verifier
43+
# is impossible and every TLS handshake panics. Use native-tls (vendored OpenSSL
44+
# linked at compile time by cargo-ndk) instead.
45+
[target.'cfg(target_os = "android")'.dependencies]
46+
reqwest = { version = "0.13", default-features = false, features = ["json", "native-tls-vendored"] }

0 commit comments

Comments
 (0)