Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The best way to learn rust depends on your learning style, the Book (https://doc.rust-lang.org/book/index.html) is fantastic even as a reference. To learn rocket I'd start with the official tutorial here: https://rocket.rs/v0.4/guide/getting-started/#getting-starte...

It might sound canned, but the rust community generally has fantastic documentation and the few edge cases you'll hit are generally well-known in the github issues with well-known causes. My advice would be that if you feel like the compiler is giving you too much grief, take a break for a day or two and then come back to it, you might find that what was giving you trouble isn't so bad anymore. The compiler is very helpful with error messages but because of the litany of information that it gives you it can become a bit of a brain overload, especially if you hit a particularly nasty diesel type error (compile time SQL is no joke!)

It's also good to know in advance that the rust standard lib is great, but fairly bare bones if you want things like JSON support. Check out https://www.arewewebyet.org/ for the tools that can help you out!

EDIT: The only other thing that I just thought of is that authz/authn doesn't have a good story in rust just yet, so I'd rely on an external service of some kind to handle that for you unless you want to do basic signed session cookies.



thanks for this - but i already know a bit of rust.

That's why your previous post was so awesome. it was a rough path to get to a production ready api/web front.

For example, i would tell an Android beginner - "use coroutines. use Retrofit. dont use MVVM, but use ViewModels. Dagger is a big pain, but Koin can break in production", etc.


Sorry, I misunderstood! As far as I'm aware there's no curated list of best practices just yet, although that would be awesome! Most of this comes from past experience with things like Flask/marshmallow and a lot of trial and error. Maybe one day when I've shaken out all of the issues at hand and I've figured out a good way of handling various scenarios I'll write something up about it




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: