Build Android apps using Rust and Iced

(github.com)

91 points | by rekireki 8 hours ago

12 comments

  • NoboruWataya 1 hour ago
    Is there a reason you didn't mention Dioxus (other than not being familiar with it)? It explicitly has Android support as a goal, though (like all Rust GUI crates) it's a work in progress. I made a very simple app with it that works well in an Android emulator, I haven't tried actually side load it yet.
    • adastra22 7 minutes ago
      Dioxus is a very different API model, being an implementation of the Elm architecture. It’s really comparing apples to octopuses.
  • coldstartops 3 hours ago
    Also on this topic I want to make a shout out to slint.dev ! (I've fiddled with it, and the syntax is extremely easy to grasp - very react-ish). Can use Rust/C as a binding language, and you can even choose the rendering engine (for example QT).
  • zwnow 5 minutes ago
    Does this support native components like camera access and stuff like that? I've learned with most libs like this I never have access to the android internals (Flutter as an example) and I'll always have to fallback to writing Kotlin components with broadcast channels or whatever.
  • vlovich123 5 hours ago
    How does this compare for you with slint and dioxus? Dioxus uses web views but still a small app (based on Tauri which uses the OS web view instead of shipping the browser) and slint is native, but may have some slightly more unique license terms than typical Rust projects.
  • androidinlimbo 2 hours ago
    Android is in limbo, we need better free open source alternative.
    • ChadNauseam 1 hour ago
      The Android Open Source Project is awesome. It's not hard to compile it yourself and run it on a pixel 9. The issue is the hardware imo. (And some of the apps in AOSP really suck, but the actual OS is great imo)
    • testdelacc1 55 minutes ago
      Account created one hour ago just to make this comment. Make it on your real account.
  • nicoburns 4 hours ago
    There is a huge amount of potential for shared infrastructure for "native integrations" for Rust UI projects. Think: React Native modules but in Rust.

    I'm hoping this can be a reality sooner rather than later. But we're definitely lacking in manpower willing or able to work on the more foundational pieces. Winit in particular is sadly undermaintained. 1 or 2 people working full time on Winit and/or other platform integration pieces would do wonders for the ecosystem.

  • serial_dev 5 hours ago
    You gotta check Crux: Cross-platform app development in Rust

    https://github.com/redbadger/crux

    • phi-go 4 hours ago
      Crux seems interesting to share app logic between platforms but I don't see how it helps actually render something. Don't you still need a gui framework that supports android or ios?
      • bbkane 4 hours ago
        Yes (from the README)
  • bbkane 5 hours ago
    Super impressive, can you link to this post in that issue?

    I'd like to try iced, but switched to egui on the official Android support.

  • RicoElectrico 2 hours ago
    Not downplaying your project but a general related question. What's the deal with writing non-real-time application software in Rust? The stuff it puts you through doesn't seem to be worth the effort. C++ is barely usable for the job either.
    • adastra22 5 minutes ago
      I don’t understand the question. Why would rust be confined to real-time applications?
    • IshKebab 1 hour ago
      It turns out it is worth the effort. Once you have got past the "fighting the borrow checker" (which isn't nearly as bad as it used to be thanks to improvements to its abilities), you get some significant benefits:

      * Strong ML-style type system that vastly reduces the chance of bugs (and hence the time spent writing tests and debugging).

      * The borrow checker really wants you to have an ownership tree which it turns out is a really good way to avoid spaghetti code. It's like a no-spaghetti enforcer. It's not perfect of course and sometimes you do need non-tree ownership but overall it tends to make programs more reliable, again reducing debugging and test-writing time.

      So it's more effort to write the code to the point that it will compile/run at all. But once you've done that you're usually basically done.

      Some other languages have these properties (especially FP languages), but they come with a whole load of other baggage and much smaller ecosystems.

  • jbfdrt7t 6 hours ago
    [flagged]
    • jemmyw 6 hours ago
      > René did have to ban an angry troll, whom he mentions in a YouTube comment as one possible perpetrator. Others think someone from the Rust (programming language, not video game) development community was responsible due to how critical René has been of that project, but those claims are entirely unsubstantiated.

      So what do we think is more likely here? Jumping the gun due to your own dislike of some groups it seems.

    • winstonewert 6 hours ago
      Perhaps you could refrain from slandering Rust proponents without any evidence.
  • nubinetwork 5 hours ago
    Just in time for google to block sideloading and blocking new apps unless you pay them 6 figures...