Native Android apps, written in Rust

Ruststudio makes native Android apps written in Rust with the Slint or egui UI toolkits. There is no web view: the same code runs as a desktop window while you develop, and tasks build, install and start the APK on a phone.

Updated · describes Ruststudio 0.1.7

Ruststudio editing a Rust project: file explorer, syntax-highlighted code, run and build toolbar, status bar
Ruststudio editing a Rust project: file explorer, syntax-highlighted code, run and build toolbar, status bar

Slint and egui draw their own pixels, so there is no web view and no Java UI to write. Develop on the desktop, then run the same code on an Android phone.

What you get

Slint

Native Android app (Slint)

A declarative UI language compiled to native code. The template includes the Android entry point and cargo-apk settings.

egui

Native Android app (egui)

An immediate-mode UI in plain Rust. The same code runs on Windows and Android.

Setup

Android setup check

Finds your SDK, NDK, JDK and adb, checks the Rust Android targets and cargo-apk, and offers the command that fixes what is missing.

Tasks

Run, build, devices

Run on desktop, run on an Android device, build a release APK and list connected phones from the Terminal menu.

Web view option

Tauri 2 starter

If you prefer a web UI inside a Rust shell, a Tauri 2 mobile starter is there too.

Try it

Try native Android

The same app as a desktop window and as an Android phone, with the Android setup check.

Ruststudio · Native Android app (Slint)Interactive · simulated

my-app

Tapped 0 times

Same Slint code in both. No web view and no Java UI.

Android setup check

  • ✔Android SDKC:\Android\Sdk
  • ✔Android NDKC:\Android\Sdk\ndk\27.0.12077973
  • ✔adb (talks to the phone)C:\Android\Sdk\platform-tools\adb.exe
  • ✔Java JDK (signs the APK)C:\Program Files\Java\jdk-17
  • ✖Rust Android targetsMissing: aarch64-linux-android
  • ✖cargo-apk (builds and installs the APK)Not installed.

Fix the two missing pieces above, then deploy.

Output appears here.

Try it: tap the button, switch to the phone, fix the setup check with the buttons, then run on the device.

Iterate on the desktop, deploy to the phone

Mobile builds are slow to set up and slow to run. Ruststudio flips that around: the template builds as a normal desktop program, so you press F5 and see your UI in a second. When it looks right, the Run on Android device task builds the library for Android, packs and signs a debug APK, installs it and starts it.

Because the UI toolkit is the same on both, you write the app once. Platform-specific code stays in a few functions you can find easily.

Ruststudio editing a Rust project: file explorer, syntax-highlighted code, run and build toolbar, status bar
Ruststudio editing a Rust project: file explorer, syntax-highlighted code, run and build toolbar, status bar

What you need on the machine

Android development needs the Android SDK and NDK from Android Studio, a JDK, the Rust Android targets and cargo-apk. The Android setup check reads your machine, lists each piece with a tick or a cross, and shows the exact command for what can be installed automatically.

  • Android SDK + NDK (Android Studio, SDK Manager)
  • JDK 17
  • rustup target add aarch64-linux-android
  • cargo install cargo-apk

iOS is in development

Native iOS support, in the same no-web-view style as Android, is being built. It is not part of the current version. Apple makes iOS apps only on a Mac with Xcode, so it will be a feature of Ruststudio on macOS.

The page on iOS app development explains what that will need and what already works.

  • Not available yet: iOS projects, signing and running on an iPhone
  • Needs a Mac with Xcode, the iOS SDK and rustup
  • Android works today on Windows, macOS and Linux

Frequently asked questions

Something else? Ask in the community forum or send feedback.

Can I build iPhone apps?

Not from Ruststudio yet. Native iOS support is in development. Apple builds iOS apps only on a Mac with Xcode, so it will be a feature of Ruststudio on macOS; Ruststudio on Windows or Linux cannot produce iOS apps. Android apps work today.

Is it a web view?

No. Slint and egui render natively. A Tauri template, which does use a web view, is available separately.

Can I use egui on Android?

Yes. Ruststudio’s native Android app (egui) template builds an egui app for Android with cargo-apk, and the same code runs as a desktop window while you develop. Tasks build, install and start the app on a phone.

How do I write an Android app in Rust?

Install the Android SDK, NDK and a JDK, add the Rust Android target with rustup and install cargo-apk, then create a project from the Slint or egui Android template. Ruststudio’s Android setup check lists what is missing and shows the command to install it.

Which Rust GUI framework is best for mobile?

For native Android apps without a web view, Slint and egui. Tauri 2 also targets mobile with a web UI. The Rust GUI frameworks guide compares them.

Does it work with the Rust I already have?

Yes. Choose any toolchain under Tools, Rust Toolchain. The Android targets need a rustup-managed Rust.

Is Ruststudio free?

Yes. Ruststudio is free for personal and commercial use, with no licence key and nothing to pay. Use it for 7 days straight away; after that you sign up for a free account with your e-mail address. It is closed-source freeware.

Who makes Ruststudio?

Ruststudio is a product of FOWLGUARD, Inc., the company behind Fowlguard Secure and Fowlguard Productivity. It is one of its free tools; see fowlguard.com.

Which systems does Ruststudio run on?

Windows 10 and 11 (64-bit), macOS 11 or later (Apple silicon and Intel) and Linux (x86-64, X11 or Wayland). You can build for the desktop, the web and Android from it. Native iOS support is in development and will need a Mac with Xcode.