android: vendor OpenSSL so the Rust core links (task 1864)
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 2m53s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 4m41s
Desktop (Tauri) / Update manifest (push) Successful in 4s
Android (Tauri) / Android APK (debug) (push) Successful in 3m40s

First Android build failed at openssl-sys: "Could not find directory of OpenSSL
installation". reqwest is pinned to native-tls, which is right for Windows — it
resolves to schannel there and keeps C and assembly out of the cross-compile —
but on Android it resolves to OpenSSL, and there is no Android OpenSSL in the
image to link against.

Vendored rather than rustls. rustls builds faster and was the obvious fix, but it
ships its own root store, so the phone would trust a different set of
certificates than the desktop: a self-hosted server behind a private or
enterprise CA would work on one surface and fail on another. Peer surfaces that
quietly disagree about who to trust is a worse outcome than a slower build, so
one TLS stack stays everywhere and OpenSSL gets compiled from source with the NDK
toolchain — which is what perl and make are in ci-tauri-android for.

Scoped to cfg(target_os = "android") so nothing changes for the Linux, Windows or
web lanes; declared as a direct dependency purely to flip the feature, since
cargo's unification then applies it to the copy native-tls pulls in.

Cargo.lock regenerated in the same commit, per the documented procedure — the
--locked gates in every lane fail otherwise. openssl-src 300.6.1+3.6.3 joins.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-16 23:11:24 -04:00
co-authored by Claude Opus 5
parent 1f140c7457
commit e8d6a4f423
3 changed files with 42 additions and 6 deletions
+14 -6
View File
@@ -188,12 +188,20 @@ Android is a peer surface, not a desktop variant, so it gets its own workflow.
other three ABIs, so widening is a one-word change.
- **Green means it BUILT.** Like the Windows lane, a Linux runner cannot execute
the artifact. Nothing here proves the app runs, renders, or is usable by finger.
- **TLS is the likely first failure.** `reqwest` is pinned to `native-tls`, which
is deliberate for the Windows lane (it resolves to `schannel`, keeping C/asm out
of the cross-compile). On Android it resolves to **OpenSSL**, which must be
cross-compiled per ABI — hence `perl` + `make` in the image. If that proves
painful, the fix is a target-specific dependency block selecting `rustls` for
Android only, leaving the Windows lane's reasoning untouched.
- **TLS: OpenSSL is vendored on Android.** `reqwest` is pinned to `native-tls`,
which is deliberate for the Windows lane (it resolves to `schannel`, keeping
C/asm out of the cross-compile). On Android it resolves to **OpenSSL**, and the
first build duly failed with `openssl-sys`: *"Could not find directory of
OpenSSL installation"* — there is no Android OpenSSL to link against.
`Cargo.toml` now carries a `cfg(target_os = "android")` block enabling
`openssl-sys`'s `vendored` feature, which compiles OpenSSL from source with the
NDK toolchain. That is why the image ships `perl` + `make`.
- **Why not `rustls` on Android.** It builds faster and was the obvious fix, but
rustls ships its own root store — the phone would trust a DIFFERENT set of
certificates than the desktop. A self-hosted server behind a private or
enterprise CA would then work on one surface and fail on another. One TLS stack
across all surfaces is worth more than the build minutes. Revisit only if
vendored OpenSSL becomes the thing that breaks this lane repeatedly.
## Formatting the Rust lane before pushing