WEB Dev with Rust - noob questions

Hello guys!

I am very new to Rust (so far I used a little Python, C# and Java). I want to make websites in Rust in future. Today I just made only "Hello World" with Actix framework. I have few noob questions:

  1. Which frameworks are good to go? I mean which are mature enough and in heavy development and have good docs/examples? I have seen on website AreWeWebYet.org that the choice of frameworks is quite big (I am surprised thaht Rust have so much web libraries). So far I met a little with Actix and Pencil (I like this microframewoork, which is Flask insipired).

  2. What would you choose / recommend for REST API only?

  3. How typical web - deployment looks like in Rust? Is it like in Golang, that you put one binary file on server and just run it?

THANKS !!!

CC1

1 Like
  • The most well-established frameworks from that list that are still being actively updated would probably be Rocket and Actix, but that's not to say that the others aren't stable - for example, Conduit hasn't been updated for a while, but Crates.io still uses it, and seems to be getting on okay!
    • Also, note that there's been quite a few new developments in the Rust web framework space recently - tower-web and warp are generating quite a bit of buzz (especially given that they're developed by the developers of Tokio and Hyper, two of the main building blocks for Rust's async/web story).
  • To be honest, I don't think any one framework has the edge when it comes to REST APIs - Rust web frameworks tend to be geared to that side of things rather than full-on websites at the minute.
  • Yes, Rust applications are just native binaries.
2 Likes

Which frameworks are good to go?

I am using Actix, works well. Some people like Rocket, but it requires nightly, so I wouldn't recommend it.

What would you choose / recommend for REST API only?

Doesn't really matter, Actix definitely is good for that.

Is it like in Golang, that you put one binary file on server and just run it?

Yes, like in Golang you generate binary... than bundle it with statics, data, configuration, dependencies and wrap all that in docker image (I seriously don't know where people got the idea that deploying any app is "just putting binary somewhere").

1 Like