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 Sep 8, 2023
1 parent 4ec6724 commit 53b1f38
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ new releases of `rustls-platform-verifier` are published. If you only use publis
These script snippets can be tweaked as best suits your project, but the `cargo metadata` invocation must be included so that the Android
implementation part can be located on disk.

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:
```
-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 53b1f38

Please sign in to comment.