6 ms·
> As of July 2020, I’d suggest picking actix-web if you are writing a production API in Rust. What about server rendered websites that aren't API? Which framew
by continuations 6y ago
> As of July 2020, I’d suggest picking actix-web if you are writing a production API in Rust.
What about server rendered websites that aren't API? Which framework would you recommend in this case?
- LukeMathWalker 6y agoUnfortunately not my area of expertise, so I don't have particularly interesting or insightful opinions to give on the matter.
- tiborsaas 6y agoI would just look for a html templating crate.
- dgb23 6y agoRocket has the option for responding with html templates.
- Tyr42 6y agoI'm enjoying using Rocket so far. I really like the FromRequest way of describing middleware and request guards. The docs are also very good. I'm on the 0.4 branch, which isn't the 0.5 async branch, so I'm blocking on db calls and such, but I'm targeting very low qps so I don't care. I got the diesel database integration working with little fuss, and can guard requests #[get("/me")] fn get(user: &User) { // Logged in view } #[get("/me")] fn get() { // Logged out view }
- stu2b50 6y agoRocket has the most batteries-included support for that, although you can just use any of the other web frameworks and either Tera (homebrew Jinja-like template syntax) or the Rust Handlebars implementation.