We define our API into the Rust via protobufs[0] and some codegen.
The wrapper around these is very lean, FFI-based[1], it's abstracted to a library so Android devs never need to know there's rust/codegen involved.
We then define a light Kotlin-based wrapper around the protobuf-generated API[2]. This is a candidate to move to Kotlin multiplatform in the near future (mostly for test speed improvements).
The wrapper around these is very lean, FFI-based[1], it's abstracted to a library so Android devs never need to know there's rust/codegen involved.
We then define a light Kotlin-based wrapper around the protobuf-generated API[2]. This is a candidate to move to Kotlin multiplatform in the near future (mostly for test speed improvements).
[0] https://github.com/ankitects/anki/tree/main/proto
[1] https://github.com/ankidroid/Anki-Android-Backend/blob/a0428...
[2] https://github.com/ankidroid/Anki-Android/blob/68192585a7ae4...