Mobile and web app in Rust

I can tell you what I've used in the past. To be clear though, I don't claim this is the best way to do things. Just what I did. Take this as anecdotal data for your search for the right tools that fit your needs.

  • Frontend: I didn't want to deal with a bunch of different frontends, so I tried to develop them cross-platform using Flutter. Flutter is evolving rather rapidly right now. Still rough around the edges but what isn't in frontend land? Integrating a RESTful API based on my Rust types into the frontend wasn't bad. The effort it took was by no means comparable to getting the state management almost right. I love sum types a lot and Dart doesn't support them (like Rust does with enums). That's what I remember as being a little inconvenient. But I never had problems with the integration. The overhead of having to maintain my domain types (over the course of years and quite a few breaking changes) in both Rust and Dart was fine.

    That being said, I like all the cool stuff the Rust community is coming up with when it comes to (web-)frontends. There are a few cool projects like yew, leptos, sycamore, dioxus or tauri which I'd like to work more with.

  • Database: So far I've mostly worked with no-sql databases and used Mongo, Elasticsearch and Redis in my Rust projects. I didn't choose them because I don't think Rust integrates well with SQL databases, it was just personal preference. Diesel, Sqlx, rusqlite are all good. I just found documents were enough for my domain model, no need to maintain a bunch of tables. The Mongo and Elasticsearch clients are official clients maintained by the respective companies and therefore satisfactory to use. There are a bunch of Redis clients for Rust, I'm sure most are good. I remember I had to look a little for the right client because I was running on tokio 0.3 still when most other crates were already using tokio 1.

1 Like