Tendai Bhebhe

Can a desktop Rust app run on Android?

Plenty of open-source apps are written in Rust for macOS, Linux and Windows, and most never reach a phone. I wanted to find out whether they could, without being rewritten. So I took PdfCraft, a PDF editor from the open-source ArtCraft suite, and tried to get it running on Android.

Status: early alpha test build. The code runs; the interface hasn't been adapted for touch yet.

PdfCraft running on an Android phone with a demo PDF open
The PdfCraft alpha on Android, running the desktop interface as-is

Why try this

If an app's code can run on Android as it is, mobile users get the same tools desktop users already have, without anyone building and maintaining a separate mobile version. PdfCraft made a good test case: a real, full-sized desktop app with a 137,000-line engine, not a demo written to prove a point.

What carried over

Almost everything. Every engine crate compiled for Android without a single change, and the full desktop interface runs as it is.

The port itself comes down to three pieces: one new interface in the shared code, a small Kotlin activity, and a Rust app crate.

What Android asked for

Android doesn't give apps ordinary file paths. A document chosen through the system picker arrives as a reference, not a location on disk. So the app copies each document into its own cache, works on it there, and writes saves back through the system picker. As a result, the app needs no permissions at all.

PdfCraft also forbids unsafe Rust. Running on Android needs a small amount of it at the platform boundary, so the port confines all of it to a single audited module, and the rest of the codebase stays as strict as before.

What didn't carry over: the interface

The interface runs, but it was designed for a mouse, a keyboard and a large screen. On a phone, some of the desktop widgets don't fit well. Reworking the UI for touch and small screens is the main job ahead.

So, is it possible?

For PdfCraft, yes. The code moved across almost untouched, and the interface is where the real work is. But one app is one data point, which is why the next step matters.

Next: the whole ArtCraft suite

ArtCraft is open source, so I want to push this further and try the same approach on the rest of the suite. Each app is another test of whether this works in general, or just happened to work for PdfCraft.

How it was built

I built the port with Claude Code, working from a porting spec I wrote.