<story><title>How we use Rust in our mobile SDK</title><url>https://bionic.fullstory.com/rust-at-fullstory-part-2/</url></story><parent_chain></parent_chain><comment><author>dpezely</author><text>For others considering Rust + Kotlin for native Android development, there&amp;#x27;s also the Visly blog post[1] with basic steps.  However, since then, Google officially released `androidx`.  Unfortunately, Android Studio or the SDK lack `cargo fix` features of modifying your source code and instead just magically compiles with a compatibility layer.  There&amp;#x27;s a PR on Visly&amp;#x27;s GitHub repo with these code fixes.&lt;p&gt;Also, their code base is minimal: does just enough with Rust shared library to have an app generate a log message.  That&amp;#x27;s enough if you already know Android development.&lt;p&gt;For a complete end-to-end example search query screen with results screen (Activity, Fragment) using Rust, Kotlin, androidx, RecyclerView, ViewModel, etc., there&amp;#x27;s [2], but it was written while learning all things Android.&lt;p&gt;Perhaps it might help someone out there!&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;medium.com&amp;#x2F;visly&amp;#x2F;rust-on-android-19f34a2fb43&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;medium.com&amp;#x2F;visly&amp;#x2F;rust-on-android-19f34a2fb43&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;gitlab.com&amp;#x2F;dpezely&amp;#x2F;native-android-kotlin-rust&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;gitlab.com&amp;#x2F;dpezely&amp;#x2F;native-android-kotlin-rust&lt;/a&gt;&lt;p&gt;Edit: Yes, that second one is mine.  Had fun learning but hopefully will never have to touch mobile dev again beyond maybe a PWA.  (I&amp;#x27;m a server-side dev.)</text></comment>
<story><title>How we use Rust in our mobile SDK</title><url>https://bionic.fullstory.com/rust-at-fullstory-part-2/</url></story><parent_chain></parent_chain><comment><author>tmzt</author><text>From the article:&lt;p&gt;&amp;gt; Because our code winds up running in other people’s apps we don’t use a full-fledged async runtime like tokio or async-rs since those are optimized for “use all available resources” scenarios like network servers or client applications.&lt;p&gt;Have you considered the recent alternative, smol [1]?&lt;p&gt;Do you have any plans to share source or build scripts for the glue components?&lt;p&gt;How have you been able to incorporate native functionality such as media codecs and screen capture with shared logic written in Rust?&lt;p&gt;Has Rust worked well when you also need to integrate with runtimes such as React Native or Flutter?&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;stjepang&amp;#x2F;smol&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;stjepang&amp;#x2F;smol&lt;/a&gt;</text></comment>