3 ms·
It means someone working on Android needs to compile something written in Rust badly enough to add support for it. The second Android developer needing to use
by skybrian 7y ago
It means someone working on Android needs to compile something written in Rust badly enough to add support for it.
The second Android developer needing to use Rust will presumably have an easier time of it, but how much Android will really use it is speculative.
- _bxg1 7y agoMeaning Rust is being used in the Android OS itself, so this isn't about app developers?
- skybrian 7y agoWe don't know what it's for. It might be used in a sample app. But it's not something ordinary Android developers need to pay attention to.
- kllrnohj 7y agoCorrect. But nothing stops you from using rust today as an app developer. See https://docs.rs/crate/cargo-ndk/0.2.0 https://docs.rs/crate/cargo-ndk/0.2.0
- stefano 7y agoDoes anyone here have experience on using Rust for shared business logic between Android and iOS? It's something I'm considering but it seems there isn't a lot of documentation around it.
- j0hnnybravO 7y agoCurrently you could use kotlin/native for such effort.
- dbrgn 7y agoFor iOS, you create C FFI bindings for your lib. Then you conpile a universal binary with cargo-lipo and use it from Swift like a C library. For Android you write JNI bindings with something like rust-jni. So yes, you have to write bindings twice. For an example project check out https://github.com/dbrgn/candidateparser https://github.com/dbrgn/candidateparser and https://www.reddit.com/r/rust/comments/7aam04/meetup_slides_calling_rust_from_c_and_java/ https://www.reddit.com/r/rust/comments/7aam04/meetup_slides_...
- mncolinlee 7y agoYes, we're sharing Rust code through Kotlin on Android and Swift on iOS. https://github.com/mozilla/application-services/tree/master/components/places https://github.com/mozilla/application-services/tree/master/...
- gameswithgo 7y agothe game "A Snakes Tale" was released on IOS and Android simultaneously, 100% Rust. The author is on twitter might have useful info for you.
- kej 7y agoRust aside, this is a well done little puzzle game and worth the few bucks. It's on Steam, also.