#3070·reqwest

Native TLS on Android?

Author: torokati44Created Jul 15, 2026Updated Jul 15, 2026

We've recently switched Ruffle from rustls to the platform-native backend, for code size considerations: https://github.com/ruffle-rs/ruffle/pull/23894 Then we had to allow switching back to rustls, because we didn't want to build/ship OpenSSL for Android: https://github.com/ruffle-rs/ruffle/pull/23947 At fist, we tried to keep it using native certificate roots, but apparently that just silently doesn't work on Android: https://github.com/ruffle-rs/ruffle-android/issues/788 So now we're moving back the Android build to rustls with bundled cert roots: https://github.com/ruffle-rs/ruffle/pull/24218

So, the natural question is - would it be possible to instead make use of Android's own TLS facilities, like SSLEngine and SSLSocket through JNI?

I realize that rustls seems to be preferred nowadays, with it being the default in 0.13, but again: we'd like to keep binary size low where possible.

Don't know if this issue would be more appropriate to ask over at https://github.com/rust-native-tls/rust-native-tls, pardon me...