3 ms·
> We built our logic in Rust, so that compiles cross platform. It's really just the UI layer that is per platform. Having never created a mobile app, how's tha
by tasuki 5mo ago
> We built our logic in Rust, so that compiles cross platform. It's really just the UI layer that is per platform.
Having never created a mobile app, how's that work exactly?
- noman-land 5mo agoCheck out tauri.
- Klonoar 5mo agoTauri is not even remotely an appropriate answer to this question.
- satvikpendem 5mo agoFFI. For example in Flutter, there are packages like flutter_rust_bridge that allow you to write Rust that then interacts with the host OS.
- david_allison 5mo agoWe 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). [0] https://github.com/ankitects/anki/tree/main/proto https://github.com/ankitects/anki/tree/main/proto [1] https://github.com/ankidroid/Anki-Android-Backend/blob/a0428512b37bf07e5bf691bae53c168df37739ad/rsdroid/src/main/java/net/ankiweb/rsdroid/NativeMethods.kt#L5-L18 https://github.com/ankidroid/Anki-Android-Backend/blob/a0428... [2] https://github.com/ankidroid/Anki-Android/blob/68192585a7ae45e6fa8cccbc427cf6603966b48b/libanki/src/main/java/com/ichi2/anki/libanki/Decks.kt#L396-L404 https://github.com/ankidroid/Anki-Android/blob/68192585a7ae4...