Installing and configuring the Rust build tools for Android.Creating an Android application with Rust code.Introduction: Building an Android app with the command-line tools.In this first blog post of the series, I’ll review how to compile Rust libraries for Android apps, and making sure we’re targeting the correct CPU architecture.įor reproducibility, you can find my code on GitHub. What started from testing one instruction on ARM ended up being quite a journey, including patching the Rust compiler! I already have one, so no purchase needed.Īs you may guess from the title, I went for this last option. Or why not using my Android phone, which is real hardware that runs on ARM?.Using an emulator, assuming it correctly implements all the instructions I want to test.įor example, the cross crate aims at streamlining that.Purchasing an ARM-based laptop, which would be quite expensive just to test a few instructions on a specific project.My development laptop runs on Intel, so running unit tests with cargo test would not test the ARM instructions. However, how to test this ARM-specific implementation? In my initial implementation, I only wrote an optimized version for Intel CPUs, but ARM supports similar instructions, so I mentioned that it would be nice to add an optimized implementation for it as well. Compiling Rust libraries for Android apps: a deep diveīy Guillaume Endignoux - a previous blog post, I mentioned how to use CPU-specific instructions in Rust to speed up the Shamir’s Secret Sharing algorithm.
0 Comments
Leave a Reply. |