Use Java instead of Kotlin?

Open
#228 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
android, java, kotlin, rust

Research direction

Start with CertificateVerifier.kt and the jni-0.22 work in pull request #193, then compare how the Android app’s existing Java shims are integrated. Done means the equivalent integration is documented or implemented without requiring Kotlin, while preserving certificate-verification behavior and the reported app-size concern.

Written by the indexing model from the issue text.

Description

O-Android

I'm not sure about this, as I may be doing something else that is non-ideal, but it appears to have added about 2.6 MB to my final .aab file. (from 17.3 to 19.6 MB).

I just got this jni-0.22 branch to work with my Android app. I ended up simply adding the CertificateVerifier.kt file directly to my project, since that was easier - required fewer modifications to my gradle files. The class files for that are only a about 25K, so I'm guessing the size change is that it pulled in the Kotlin stdlib. Before this I had only a few .java files in my Android project, for a main activity and a couple other shims/connectors for help via JNI.

Kotlin is great and any normal Android project is going to use it. But when writing the app mainly in Rust like I am, it's not needed.

And 2.6 MB is probably nothing these days, but for Rust, where you can be very lean and mean, it might be nice to be a perfectionist here... ?

Dominant language
Rust
Stars
162
Forks
67
Avg merge
5d 14h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rustls/rustls-platform-verifier

All issues in rustls/rustls-platform-verifier

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.