Rustroid - A Rust IDE that runs locally on your Android phone

Hello fellow developers.
I'm Mohammed Khaled, and I'll get straight to the point cuz i just don't like writing text.. I write code.. :)

I have just completed one of the biggest projects of my life. For about a year, I've been working on an IDE for Android (that runs on Android locally). By IDE, I truly mean an integrated development environment, one that offers features like syntax highlighting, auto-completion, diagnostics, signature help, go-to definition, declaration, implementation, show documentation, and more.

Currently, it's for the Rust programming language. I chose Rust because it's consistently one of the most admired languages in the annual Stack Overflow surveys.

A lot of the code in the IDE is shared, so it wouldn't be too difficult to adapt it for other languages in the future.

The IDE allows the user to export APKs for graphical applications and games and also lets them run the app quickly without having to install it. The app actually uses a strange dynamic loading technique to load itself from the shared library it generates from your code.

I've created a website for the app where I detail its features: https://rustroid.is-a.dev

And I wrote about why and how I created the app in this article: How did i made Rustroid. A fully featured Rust IDE for Android. | Rustroid

The application is available on Google Play (You can also check out screenshots there).

I do think that it will be useful to anyone who don't own a PC or just want to learn the language and build real projects on the go.

Disclaimer: The application is not open source and/or free.
I explained why is that in detail in How did i made Rustroid. A fully featured Rust IDE for Android. | Rustroid

13 Likes

This sounded too good to be true considering I have been trying to write a rust IDE myself and been failing bad in many aspects. So I bought it to try it and damn, it has all the infrastructure I would want. Even has a macroquad project template.

You can execute your project and it just opens in a new android window. Haven't tried generating apks yet, but I am impressed. Now I can finally hack on my phone without painful termux setups. Def worth 7€ to me

Some questions I have for the author:

  1. Have you been able to edit your ide from within your ide? :laughing:
  2. Would you be willing to take contributions? I know it's closed source, but I have so many things I want to try out.
  3. I understand keeping it closed source for the reasons you explained. Need to pay the bills somehow. I have no idea if you could have your cake and eat it, too, by having it open source under a restrictive license and being the only person allowed to sell or distribute it. The few people who will build it from scratch themselves shouldn't affect sales.
  4. Not a question: you should add yourself to Tools - Rust Programming Language
4 Likes

I'm really glad you liked it! Here are the answers to your questions.

  1. Unfortunately, it's not possible to compile it yet. The IDE contains both Kotlin and Java code, so it can't be compiled within a Rust-specific IDE.

  2. I would love to accept contributions, as there are many features I'd like to implement, and I'd be very grateful for help from the amazing open-source community. But unfortunately, the IDE is currently closed-source. In the long term, I do plan to open-source it or at least make it source-available in the future (kinda similar to the Aseprite license aseprite/EULA.txt at main · aseprite/aseprite · GitHub).

  3. Maybe in the long term or at least after i have a job :smile:

  4. Thanks for the advice! Will try to submit a PR.

It's really really great to know that you think it's good! I created it with the idea of having a tool I'd want to use myself when I'm away from my PC so i tried to do my best!

Thanks for your kind words!

1 Like

Heck I'd probably pay $7 for a programming friendly keyboard alone! I'll take a deeper look when I get a chance but this does sound really cool from the top.

1 Like

Can build my projects, clone from GitHub easily, run tests. With foldable phone and small Bluetooth keyboard looks like travel workstation not so bad.

1 Like

Hi, great stuff! A couple of nuances:

  • It is harder to scroll code that has long lines, you need to scroll quite vertically, if there is horizontal movement too it won't scroll. Important when scrolling long files with the right finger.
  • Can't search. Not even grep-like. My primary use case for this would be browsing, as GitHub is not so pleasant on mobile, so search is quite important to explore the project.
  • No way to remove selection without clicking somewhere else, which would trigger the keyboard and a layout shift. "Back" gesture would trigger "Confirm exit", so it is not an option too.
  • In general, something like "read only" would be great, so you don't have to be careful to not accidentally click the text, which will case the keyboard to open and layout to shift.
  • If you didn't have a keyboard opened, then open another application and switch back, the keyboard will open.
  • Example of an unhelpful pinned context (it could be made useful though):

1 Like
  1. Scrolling in long files is somewhat difficult due to a limitation in Jetpack Compose (The Android UI Framework). However, the next version of Jetpack Compose (which is now in alpha) has implemented 2D scrolling, which will allow me to ignore the axis with little movement and focus on the one with greater movement. This should be fixed when the next Jetpack Compose version becomes stable.
  2. Search support is a work in progress!
  3. I think this is the default behavior on Android. Maybe I should make the back gesture close it?
  4. Fair enough, I'll start working on a read-only mode. Although, you'll notice that when you open files from outside your project (using Go to Definition), you can't edit them. So, I would say it's partly implemented :nerd_face:.
  5. "The pinned context" is also referred to as Sticky Scroll. I know that it may not always be useful, but it helps the user track the scope of the code. You can adjust the maximum pinned lines or disable it entirely from the code editor settings.

Thank you so much for trying the app!
And sorry for the late response.

3 Likes

Having fun with this so far. Do you have any plans to bundle rustup as well maybe?

2 Likes

Bundling rustup is kinda complicated.. that's because cross compilation is not supported in Rustroid (at least yet).
However, i do plan to offer rust nightly support at some point.

1 Like

Good project really appreciate your works here but few of my students can't afford it because of the rate in their countries.

1 Like

Hi!
Iam glad to know that Rustroid may be useful to your students.
As i said in the article. If you don't have enough money. Contact me and i will try to give it for you for free.

I don't have any problems with that!

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.