3 ms·
Show HN: Learn Rust 101 – A guide to aid your journey of becoming a Rustacean
- revskill 4y agoShow me one complicated enough js program and refactoring to rust is better way to guide
- quietbritishjim 4y agoI can't parse that sentence. Are those book titles?
- jstanley 4y agoI 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".
- papichulo2023 4y ago[flagged]
- gdcbe 4y agoHi 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.
- kajaktum 4y agoEvery single one? A complicated enough JS project will have ad-hoc type checking with typeof and null coalesce operator.
- mooooooooooooo 4y agoAn incremental refactor with typescript would make more sense here? I can’t imagine managing lifetimes in a spaghettified JavaScript repo
- kajaktum 4y agoYou can use Arc eveywhere i guess?
- Animats 4y agoThis 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.
- gdcbe 4y agoHi. 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.
- fayalalebrun 4y agoIf 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.
- Havoc 4y agoFrom 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
- Patrickmi 4y ago>Oracle developed a container runtime with Rust to overcome problems with the Go reference implementation. Did this ever passed experimental stage ?
- arco1991 4y agoWas trying to get into Rust, this is great, thank you!
- gdcbe 4y agoYou're more then welcome! Hope it helps you out :) And if not, happy to hear feedback.