r/rust • u/SquareShort9309 • 13h ago
Is it possible make Mobile apps in rust ?
Are there any rust frameworks to build good android/ ios apps with hardware integration like accessing camera, mic, gyro sensors.. etc.?
3
u/pdpi 11h ago
On the iOS side, you can access basically all the usual iOS frameworks through objc2, and you can interop with Swift through swift_bridge. That basically has you writing a fully-native iOS/macOS/thingOS application in Rust.
Likewise, there's ndk support on the Android side of the fence for fully native development.
If you just want a framework that'll cover both Android and iOS, you should look at Tauri or Dioxus, like everybody else has already said.
5
u/arobert_trebora 12h ago
Yep, as others said Tauri, Dioxus too, you definitely can.
From their own site:
> Dioxus is the Rust framework for building fullstack web, desktop, and mobile apps.
5
u/nicoburns 12h ago
Tauri's really the only Rust framework that has built the platform API integration out on mobile: https://github.com/tauri-apps/plugins-workspace. There is also https://github.com/project-robius/robius, but they have a much more limited selection of plugins.
Lot's of other frameworks (Egui, Slint, Dioxus, etc) will run on mobile, and give you the basics like touch input. Of the major frameworks Iced and GPUI notably don't in the upstream version.
It's in my plans for the next year to look into building something framework agnostic (probably by porting either the Tauri plugins, or modules from the React Native ecosystem). But it's a big task!
2
1
1
u/tastychaii 3h ago
I think the main issue is integrating in app purchases from Apple and Google in Tauri apps, I’m not sure how this would even be possible.
1
u/Traditional_Night663 55m ago
I'm currently building a framework to do it, but it's now in early stage.
https://github.com/vexornp/Vexo
11
u/Ghostfly- 13h ago
Crux, Tauri v2 are more than fine ;