Native Android apps, written in Rust

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.

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

Try native Android

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

Rust Studio · 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.

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.

Iterate on the desktop, deploy to the phone

Mobile builds are slow to set up and slow to run. Rust Studio 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.

Rust Studio 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 needs a Mac with Xcode

Frequently asked questions

Can I build iPhone apps?

The same Rust code can target iOS, but iOS builds need a Mac with Xcode, so Rust Studio on Windows cannot produce them.

Is it a web view?

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

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 Rust Studio free?

Yes. Rust Studio is free for personal and commercial use, with no account, trial or licence key. It is closed-source freeware.

Which systems does Rust Studio run on?

Windows 10 and 11 (64-bit). You can build for Windows, the web and Android from it. iOS builds need a Mac with Xcode.