Skip to content

Commit e07fc77

Browse files
committed
Add note about possible issues due to Proguard optimizing out the Android component
1 parent 710c5ae commit e07fc77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ new releases of `rustls-platform-verifier` are published. If you only use publis
9393
These script snippets can be tweaked as best suits your project, but the `cargo metadata` invocation must be included so that the Android
9494
implementation part can be located on disk.
9595

96+
If your Android application makes use of Proguard for optimizations, its important to make sure that the Android verifier component isn't optimized
97+
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
98+
can do this for you:
99+
```text
100+
-keep, includedescriptorclasses class org.rustls.platformverifier.** { *; }
101+
```
102+
96103
#### Crate initialization
97104

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

0 commit comments

Comments
 (0)