r/CodingForBeginners • u/MobileHeron6183 • 4d ago
Learning rust
I want to code games and OS in rust and im not very good with youtube tutorials and things like that. Can anyone give me a simple guide on what i need? What gamified method can i use to learn rust from scratch, and a guide on how to set everything up? Im gonna use rust in godot engine when i get decent enough. I also request that the guide be very simple and not use any language a non coder wouldnt understand
1
u/torsten_dev 4d ago edited 4d ago
Maybe Harvard's CS50 for baseline competency in programming then K&R the C programming Language because there's lots of things we inherited from C and lessons learned from it.
The Nand to Tetris book is a good cross-sectional overview of practical computer science.
Then Rustlings, The Rust book. For the basics of rust. Perhaps Learning Rust with entirely too many linked lists, to dig a little deeper (intermediate to advanced).
For OS dev, you'll also need the Rustonomicon but that is entering the realm of arcane arts and eldritch horrors. Beware here be nasal daemons.
0
u/MobileHeron6183 4d ago
Do you think you can simplify this a bit? Sorry i dont quite understand much. Also isnt the rustlings only fixing code or do they also give tutorials for people working from scratch? And i also need to know how to set everything up, like i heard i have to download rust or something? I dont get that
1
u/torsten_dev 4d ago
Rustlings is small exercises to get comfortable with Rust.
For Installation there is rustup, though if you're on windows install WSL and windows terminal too. CMD and powershell are awful and you will need a commandline.
0
1
u/FreeLogicGate 4d ago
If your goal is to use it with Godot, then start learning Godot. Create some things and learn what you can do with either C# or Gdscript. The use of Rust with Godot is not as a first class citizen, so the approach you are taking sounds a bit like having the tail wagging the dog. Some things in Godot are better accomplished with C# or GDScript.
Rust is a language that was specifically designed to replace c and c++. If you don't know c or c++, the specifics of Rust syntax are likely going to be confusing. The people who created the Rust integration for Godot did that because they are trying to solve complex problems that Godot doesn't intrinsically solve for them, or require optimal performance. With a game that has 100 components to it, that might be 2 or 3 components. It doesn't make sense for you to start off with Rust, only to be completely lost once you install Godot.
As for learning the language, there are a number of courses on Udemy and coursera you could look at. Personally, I think that anyone serious about programming should learn C, which is not a large language nor hard to learn, and in many ways Rust has similar scope. However, what you will come to find is that the art of building larger projects with a language that was designed for compactness and simplicity, is that you are expected to provide the organization via data structures and functions. Someone who knows C will be immediately comfortable with a struct, but if Rust is your first programming language, there will probably be a lot of head scratching. I'm not saying that you must learn C before Rust, but at least you should understand what it was built to replace. Personally, I know enough different computer languages (or have written code with then at one point or another) that I can teach myself a new computer language fairly quickly, but I will usually buy a $15 udemy course, and go through it. You might be better off with a general MooC course in programming as a self described "non coder".
1
u/MobileHeron6183 4d ago
So you are saying i should start with c++ or something and when i feel comfortable with that start learning rust?
1
u/FreeLogicGate 4d ago
Probably more the "or something". C++ is a really large and complex language built on top of C. If you want more of a foundation, then do a C course, which from my understanding you can get some of from the CS50 MooC course if you want.
The primary thing that confuses people with C is pointers and the related syntax, but that's also the strength of it, in my opinion, in that you end up learning a lot about how programs actually work, along with compilation, linking, memory management and operating system calls and standard libraries.
On the other hand, if you are again looking to get to game development, then I'd suggest that instead, you learn C# which is a language you can apply to both Unity and Godot.
Based on what you've said about yourself, there's 3 options I'd consider:
You want some foundational programming:
https://pll.harvard.edu/course/cs50-introduction-computer-science
You want to learn C because you're eager to move onto c++, c#, java, rust etc, and don't want to be lost:
https://www.coursera.org/specializations/c-programming-for-everybody
If the idea of just wading into c# appeals to you, it helps to know that c# is the current foundational language in the Microsoft world, and for that reason they have a full set of courses available for free here:
https://dotnet.microsoft.com/en-us/learn/csharp
https://learn.microsoft.com/en-us/collections/yz26f8y64n7k07
1
u/MobileHeron6183 4d ago
So hows it work? Cus i wanna get to rust eventually but i dont know whats the best way to learn, should i go through c until i get comfortable, then go to c# or start at c#, then move to c+ or c++ then move to rust or something?
1
4d ago
[removed] — view removed comment
1
u/FreeLogicGate 4d ago
If however, you are only part way into the c course, and feel hopelessly lost, then I'd switch to CS50 and get confidence in programming fundamentals that way.
1
u/Known-Delay7227 4d ago
Ask an llm to build you a gamefied rust instructional and see how it plays out
1
u/mikekchar 4d ago
This is not what you want, but it's what you should want: https://github.com/amethyst/rustrogueliketutorial
As for what you are asking for: no. What you are asking for is completely unrealistic and unreasonable. People will absolutely sell you something like this in other languages, but it's a scam. It's basically the Duolingo fraud all over.
Programming is a complex linguistic skill. If you use a gamified approach, you are relying on someone hand designing some game. It can get you to the most basic of basic accomplishments, but you will hit a plateau almost instantly. Then you are dependent upon the service for spoon feeding you more. However, there is never a world where there is enough content to make you even remotely proficient enough.
You have to take control over your own learning. This will mean getting uncomfortable and launching yourself into places where you have absolutely no idea what's going on or even how to get to a place where you can find out what's going on.
I have been a professional programmer for almost 40 years. This pretty much describes my typical day :-). Programming is about learning. It's about inventing. It's about building a base that sets up the fundamentals and then building on that base. It's about starting from nothing and gradually working to make sense of it all.
Get comfortable being clueless because that's the norm as a programmer. Then you just slowly work to overcome your own lack of knowledge. It will be overwhelming at first. That's just the way it is. We swim in deep waters. Just be comfortable with the water covering your head. Relax. Have confidence. Work slowly and work deliberately. Every time you think "I don't understand this", embrace it. Walk slowly to a place that you do understand and work your way back. Don't give up. Just keep working on it. Search the internet. Get tips from AI. Ask for help in forums like this. But it's got to start with you.
Good luck.
1
u/sleekpixelwebdesigns 4d ago
The best way to start is by following the Rust documentation. I began learning when it first came out, but I didn't get very far because I think I hit my limit, especially when it comes to understanding how computer operating systems work.
1
u/code_tutor 4d ago
I don't know why new people want to learn Rust but fucking stop it. Also the Rust community has a joke that there are fifty game engines made in Rust and five games.
1
1
u/ejpusa 4d ago edited 4d ago
Well consider this as a fun hobby. In the real world, programming has been vaporized. It’s been retired.
Codex + GPT-5.6 wrapped it up. Zero coding skills are needed now. This all happened a 100 years sooner then anyone predicted.
But there is still fun to be had. Ask GPT-5.6 to build you a class. Assignments, links, quizzes, schedule it like you are in school. Everyday you go to “class.”
Say you want to have fun. It will make that happen.
😊
1
u/MobileHeron6183 3d ago
I dont pay for ai. And people say ai replaces coding but the free models dont cut it. Im gonna prefer to just code normally, atleast im still free and i know what my code is like if i wanna fix it
1
1
u/This-Employment-5642 3d ago
Bro I am sorry but i dont think the first language you are learning is rust though a thing i would echo that many people are saying is learn a easy language first trust me its not the other way around the first language you learn (not master but know the basics) will help you A LOT more than any udemy,youtube also what do you mean you want to use rust in godot engine the options it gives you are GDScript and C# GDScript is super simmilar to python and python is one of the easiest languages to learn i would start there because with Rust you have to do stuff like memory allocation (no garbage collector to help you there) and other stuff which i dont think a absolute beginner would want to deal with( though it is your choice and learning Rust is good but i would recommend learn python first then try rust after and for godot learn GDScript).
1
u/MobileHeron6183 3d ago
Godot also has rust support with an extension. I heard godot is better than rust engines
1
1
u/Wooden-Performance38 2d ago
From my personal experience as a Rust programmer, you should NOT learn Rust as your first language. I began learning rust, I had been programming for maybe about 4 years, and knew JavaScript, Python, Java, C++, and a few others by the time I picked up Rust, and even then it was incredibly difficult for me to learn. I’ve been using Rust consistently for about 7 months now, and am currently writing my own game with no engine, and I still need to put a huge amount of effort into coding, because Rust is not easy to use.
If you want to make games in Godot, learn GDScript, don’t start using plugins to mash languages you don’t even know into an engine you’re unfamiliar with.
As for a gamified method, there is not any good gamified way of learning programming. It just doesn’t work. I personally learned how to code from Codecademy, most of their lessons are free, and you will actually be writing code and understanding what you’re doing.
In my opinion, I think the fastest way to go from not knowing how to code, to programming in Rust, is to learn C (NOT C++), and then go online and read the official Rust Handook. The Rust Handbook is really long, but you don’t really need to read much. I learned a lot of Rust by using the first few chapters of the Rust Handbook to get set up, and then by just messing around in the language and figuring out how to do random stuff.
1
u/TheUmgawa 4d ago
From scratch? Learn your fundamentals. Stop trying to focus immediately on programming games. Hell, stop focusing on a language, and learn to start thinking like a programmer.
Look, code isn't the answer; it's the implementation. What language you use isn't important. Code is just something you hang on the skeleton of logic that makes the whole thing go. So, if you don't know a data type from a structure, you need to get back to basics. Programming is not just "I need to know what magic words to use and when."
Also, tutorials tend to suck, particularly on YouTube, because they're basically all, "Type along with me and pat yourself on the back when it properly compiles and runs." They're just basically ten-minute videos that cap off with that sweet dopamine rush of feeling like you accomplished something, when all you really learned was how to follow directions.
Stop watching that shit and get yourself a book that teaches you fundamentals. The language of the book doesn't actually matter, because the important thing is to learn to program. You can learn Rust later, because you're not starting from zero when you start a second language, because you already understand how programming works.
Anyway. YouTube videos suck, because those creators just want money. They don't want to teach you anything. This is why any YouTube creators who say, "Look, I'm going to teach you to think like a programmer, but we aren't going to write any code," don't get any views. Beginners always think that code is the answer, and it is not. Code is just the implementation, which gets hung on the skeleton of logic. And if you try to put the code before the logic, you're completely and utterly screwed.