Skip to content

Commit

Permalink
Add note about possible issues due to Proguard optimizing out the And…
Browse files Browse the repository at this point in the history
…roid component
  • Loading branch information
complexspaces committed Dec 25, 2023
1 parent 9081ec8 commit a0126eb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ successfully, resulting in a `rustls` group appearing in Android Studio's projec
After this, everything should be ready to use. Future updates of `rustls-platform-verifier` won't need any maintenance beyond the
expected `cargo update`.

#### Proguard

If your Android application makes use of Proguard for optimizations, its important to make sure that the Android verifier component isn't optimized
out because it looks like dead code. Proguard is unable to see any JNI usage, so your rules must manually opt into keeping it. THe following rule
can do this for you:
```text
-keep, includedescriptorclasses class org.rustls.platformverifier.** { *; }
```

#### Crate initialization

In order for the crate to call into the JVM, it needs handles from Android. These
Expand Down

0 comments on commit a0126eb

Please sign in to comment.