Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Learn Rust 101 – A guide to aid your journey of becoming a Rustacean (github.com/plabayo)
114 points by gdcbe on April 8, 2023 | hide | past | favorite | 15 comments



This is more "learn web development in Rust" than Rust in general.

"In case you come from Python or Javascript you can alternatively replace the first four steps with a single book. Rust Web Programming."

Rust for web backend stuff may be overkill. Go is designed for that job. But if your AWS bill is huge and your back end is node.js or Python, converting may help.


Hi. Author here. I appreciate the feedback. Perhaps it’s confusing that I put that chapter first, might need to put it as an appendix instead.

If you look at the learning path it should be clear that it is learning rust in general, with the content going from very accessible to more intermediate.

The learning resources are focussed on learning rust and only touch on web development (full stack) when the learning resources touch it as an example.

The original motivation to bundle this guide was to help onboard members of my time in the world of Rust as we are building a new MITM proxy for the web stack which can be considered as a proper systems programming project, especially given how much traffic we put through it. I experience Rust also really excels here.

But again, I’m always open to feedback. So happy to listen and discuss more. Thanks for checking it out as well.

Edit: in the meanwhile I've moved that section to an appendix at the end as to not have it seem like a focus. Thanks again for the feedback.


If your product not only requires a backend but also things like using 3D graphics APIs or interaction with low-level OS APIs, then Rust can be a great choice. One of the best things about Rust is that it is well suited for everything C is used for, but at the same time is very ergonomic for things like web backends.


From some very casual testing on GCP cloud run a custom rust container performs tangibly better than go or python containers (built with GCP web UI) on mem, latency and start metrics.

Definitely an apples vs oranges comparison (scratch docker vs whatever GCP's usual go/py container is) but was still surprised how much scope for improvement there is over their presumably optimised default runtimes


Rust on Lambda's using containers as the deployment artifact are also very good, i'd say a perfect match. Low artifact size, low cpu+memory usage, fast execution. I think AWS must be using increasingly using Rust on Lambda internally from the talks I've seen them publish and the work gone in to https://github.com/awslabs/aws-lambda-rust-runtime.

For simple REST API's there's not much extra effort in using Rust once you are familiar.


Was trying to get into Rust, this is great, thank you!


You're more then welcome! Hope it helps you out :) And if not, happy to hear feedback.


>Oracle developed a container runtime with Rust to overcome problems with the Go reference implementation.

Did this ever passed experimental stage ?


Show me one complicated enough js program and refactoring to rust is better way to guide


Hi Revskill, thank you very much for your input, I do appreciate this and I hear you.

I would like to clarify that this guide is not meant as a book or a course in itself. It is used by me as a guideline for my students and classes and I share it as open source so hopefully it can also help out others, be it teachers or students.

Learning by porting something known from a language of comfort to a language you wish to learn (eg rust) is a great learning style and approach to solidify theoretical knowledge, gain new insights and get practical experience in it. So just to say that I do appreciate that way of learning and in fact when talking to students about projects they can do as part of their learning journey I pretty much always mention the idea of porting something existent as a way to learn.

That being said I do not know of any good and complete step by step walkthroughs of such endeavour. If you know of any good books, blogs or videos that provide this feel free to share with me here or as a PR in GitHub and I’ll review to see if it can be added (eg can be great addition to the learn more rust section where I list such ideas).

Again thanks for the feedback and I wish you a nice weekend.


I can't parse that sentence. Are those book titles?


I think it's "a better way to teach Rust would be to show me a javascript program and then show me the same program rewritten in Rust".


Every single one? A complicated enough JS project will have ad-hoc type checking with typeof and null coalesce operator.


An incremental refactor with typescript would make more sense here? I can’t imagine managing lifetimes in a spaghettified JavaScript repo


You can use Arc eveywhere i guess?




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

Search: