Rust 101 Crash Course: Learn Rust (6 HOURS!) + 19 Practice Exercises | Zero To Mastery

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ •

  • @ZeroToMastery
    @ZeroToMastery  3 місяці тому +1

    Use code YTRUST10 for 10% OFF Jayson's Full Rust Programming Bootcamp or a Zero To Mastery Academy membership, giving you access to this course and 100+ others!
    zerotomastery.io/courses/learn-rust/

  • @MoldyOne
    @MoldyOne 9 місяців тому +34

    I watched this video on 5/31 of last year, but I had to come back and leave a comment. Not going to lie, initially I didn't want to watch a 6 hour long video. I binge watched the whole video in one sitting, I had a good understanding of the principles of Rust.
    Fast forward to today. I've been developing applications at my job in Rust for the last 6 months. This video was the beginning of my Rust journey and I can't thank you enough!

    • @ZeroToMastery
      @ZeroToMastery  9 місяців тому +3

      We are so happy for you! Keep going 💪

  • @humanperson8418
    @humanperson8418 11 місяців тому +42

    1:52:13 - Skip basics
    2:52:23 - Memory
    2:56:30 - ownership
    3:22:50 - impl
    3:53:50 - Strings
    4:09:41 - Derive (#[derive(Debug)])
    4:20:34 - Revisited Enum & Match
    4:42:52 - Options Type (Maybe Monad)
    4:58:59 - Documentation (/// this is a doc comment)
    5:01:20 - Standard Library (rustup doc)
    5:08:46 - Result Type
    5:34:30 - Activity - Result & ? operator
    5:42:24 - Hashmap Type

  • @Hyyfhkbe
    @Hyyfhkbe 2 роки тому +188

    This is the best resource to start learning rust. After this video I recommend looking up the playlist 50 Rust Projects by Akhil Sharma. These two combined is a great starting point.

    • @ZeroToMastery
      @ZeroToMastery  2 роки тому +11

      We appreciate it so much 😊

    • @akashchandra2223
      @akashchandra2223 Рік тому

      After all that just the starting point how long does it take to get a role?

    • @akashchandra2223
      @akashchandra2223 Рік тому

      I mean how do you how much is more out there?

    • @NphiniT
      @NphiniT Рік тому +10

      ​@@akashchandra2223 If you are looking for a job ASAP. You in the wrong place imo. Rust is for experienced devs that are getting ready for the transition of backends to rust.
      To get a job, focus on a niche, learn the most popular technologies in that niche, build portfolio of projects in that niche and start applying for jobs.

    • @akashchandra2223
      @akashchandra2223 Рік тому +1

      @@NphiniT what types of jobs or areas should a person look into?

  • @Vexcent-m
    @Vexcent-m 5 місяців тому +9

    This is the best full Rust guide at the moment, I've gone through all the others and they have issues, bad voice quality, bad explanation, little to no structure, etc.
    Thanks Jayson for this, it's really awesome and we all deeply appreciate your work

    • @ZeroToMastery
      @ZeroToMastery  5 місяців тому +2

      Glad it helped and thanks so much for the kind words 🙂

  • @prawnydagrate
    @prawnydagrate Рік тому +15

    This is the best Rust tutorial I've literally ever seen. I just binge-watched 3 hours and 40 minutes of this video in one sitting, while also making myself extremely proud with code I wrote myself. Thank you so much.

  • @WarrenMarshallBiz
    @WarrenMarshallBiz Рік тому +9

    "memory is just data". This is an eye-opening concept and new programmers don't see at first. Once you pull back the curtain and have that "oh wow!" moment, it really frees you up to do some interesting things.

  • @Lapatate-s1l
    @Lapatate-s1l 4 місяці тому +4

    I bought multiple rust courses , I couldn’t follow up more than 1hour . This course is the best by far. Thank you very much .

  • @Jonathanlouisa
    @Jonathanlouisa Рік тому +4

    Thank you so much! This is by far the best course on Rust for beginners out here, while I'm an experienced programmer myself. My first sitting learning Rust with this course was 5 hours straight while passing all the exercises myself, making me extremely proud. Jayson, thank you very much!

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +2

      Thank you so much for the kind message! We are very happy that you’re finding the crash course helpful 😊

  • @JeffDZ40
    @JeffDZ40 3 місяці тому

    Personal Tracking Note Pad: 15 days of Rust
    Day 1: Continue from 48:48
    Day 2: Woke up later bu continue from 1:02. Do the activity 2 again
    Day 3: Continue from 1:34:03
    Day 4: Continue from 2:05:38

  • @nserban22
    @nserban22 Рік тому +8

    Best Rust Course that I have seen so far ! Thank you so much !

  • @neerajbg
    @neerajbg Рік тому +3

    This is the best resource for Rust. After watching this video I feel more inclined to Rust and have regained confidence.

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      We are so happy to hear that! Thank you so much for the kind words 😊

  • @GDScriptDude
    @GDScriptDude Рік тому +4

    I've never listened to such a clearly explained course as this. I'm in envy of Jayson's teaching skill. I'm an hour or so in and enjoying the course even though I am an experienced programmer and could maybe learn it faster by reading docs. I feel like a beginner to programming could maybe learn Rust here.

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Glad you found it helpful! Thanks for the kind words 😊

  • @asxes
    @asxes 9 місяців тому +1

    I've almost checked all rust videos. This is the best.

  • @adamwhite8042
    @adamwhite8042 Рік тому +18

    I'm only one hour in and already loving this!! Thank you for the crystal clear explanations!! The explanations about the flow of the code is especially helpful

  • @PeterSahanaya
    @PeterSahanaya Рік тому +1

    The best programming tutorial that i've ever watched

  • @shimonpertz
    @shimonpertz Рік тому +1

    I have read the Rust Book and watched your video looking for anything that I have missed from the book. I would highly recommend your video to a newbie. Thank you and keep up the good work!

  • @stanleyinhkg
    @stanleyinhkg 11 місяців тому +2

    It's really helpful that you illustrate the route the code goes, and it make me understand much more about the logistic it works. highly appreciate your work and i find it so............... useful! it ignites my journey to learn coding again. hope i could use RUST to contribute to blockchain development, though I am new to programming.

    • @ZeroToMastery
      @ZeroToMastery  11 місяців тому +1

      Glad it was helpful! 😊

    • @stanleyinhkg
      @stanleyinhkg 11 місяців тому

      @@ZeroToMastery if i wanna use RUST for blockchain development, which program on yr website fits?

  • @_komaster
    @_komaster Рік тому +44

    Thanks a lot, Jayson. The course is awesome. I'm new to Rust, and one of the things that I didn't understand was ownership and its String, &str. However, you explained it extremely well and made it much easier to understand

  • @nugenator
    @nugenator 5 місяців тому

    I've never seen any clearer explanation about the ownership in rust. Wonderful. Thank you very much!

  • @robin_c24
    @robin_c24 Рік тому +3

    It's the best course for beginner's. The course provides extremely clear explanation. This helps me alot for my hackathon 😁😁

  • @PeterSahanaya
    @PeterSahanaya Рік тому +2

    after watch this video, now i know why rust is the most loved programming language

  • @ymk6369
    @ymk6369 4 місяці тому

    I decided to take this course out of simple curiosity about the advantages of the Rust programming language, despite knowing nothing about Rust beforehand. In my experience, the difficulty level was just right, and the attached practice codes were particularly helpful in understanding the concepts. Thank you for the great course!

  • @ugwucosmaschibuike975
    @ugwucosmaschibuike975 8 днів тому

    Hands down the best I have seen so far

  • @umamentepelomundo
    @umamentepelomundo Рік тому +5

    I really like your simple explanations! Is fast and direct to a point!!! Very Good!!!

  • @alexseydugin8109
    @alexseydugin8109 5 місяців тому +1

    I came here for smart pointers, because im reading in the book right now about them. Really would ne nice to see some other explanation for them

  • @leonardopx
    @leonardopx 4 місяці тому

    This is the best introductory course I have seen so far. Thank you very much!

  • @i.k990
    @i.k990 Рік тому +1

    At 32:25 the first if condition is missing "}"!
    Btw this is my first but one of the best course i will ever encounter!

  • @weizhenluo5882
    @weizhenluo5882 9 місяців тому

    Best Rust tutorial I've ever followed. Thanks for your great work.

  • @areeburrehmankhan1166
    @areeburrehmankhan1166 Рік тому +1

    I have also looked at a couple of other courses of rust but this is by far the best course that I have ever come across it explains things in such a clear manner that a beginner can ask. I love the course. also I have a request can you also make a go lang related crash course

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Thank you for the kind words! and I can't confirm or deny 👀

  • @adehenry9591
    @adehenry9591 Рік тому +1

    Im finally learning rust because of your videos. Thanks a lot

  • @madhuvarun2790
    @madhuvarun2790 8 місяців тому

    At 3:34:57 Let's say I want to call print function from small_dimensions in the main function. However small_dimensions variable is borrowed by shippingbox implementation. How do you do this?

  • @a_maxed_out_handle_of_30_chars

    this was absolutely amazing, thank you :)

  • @mareksicinski9575
    @mareksicinski9575 Рік тому +5

    I just started learning this programming language at university and this course is a game changer, you helped me a lot, thank you

    • @oredaze
      @oredaze Рік тому

      They teach rust at university now?!
      Is it a beginner oriented course?

  • @loserdavictor
    @loserdavictor 7 місяців тому

    i forgot what i learnt from the book in feb so i went thr comprehensive rust by google and i was stuck, googled and found this video // didnt watch but opened the link for exercises and did those then when it started getting difficult, i watched those videos :)
    leaving the comment since it improved my rust knowledge than before, thank you💜

    • @ZeroToMastery
      @ZeroToMastery  7 місяців тому +1

      Glad it helped and thanks for sharing 😊

  • @smithclk
    @smithclk 4 місяці тому

    Many thanks Jason. Very informative, clear and easy to understand. I feel very comfortable with Rust because of this course. One of the best Rust courses on the internet.

  • @ahmedn76841
    @ahmedn76841 Рік тому +1

    Really appreciate your efforts. I just finished it and helped me a lot with grasping most concepts

  • @avinashjha7858
    @avinashjha7858 4 місяці тому

    The course is awesome, really helpful for learning the language. I appreciate your work and the way you explain all the concepts. Thankyou Jayson.

  • @alexbork4250
    @alexbork4250 5 місяців тому

    4:37:22 it's weird to see enum's definition has just types (f64, String). How do I suppose to know what is what?

  • @raqueliglesias_0
    @raqueliglesias_0 6 місяців тому

    Fantastic video. I think it’s the best video of rust I found. You have a fantastic didactic, explaining very well complex concepts with good structured examples. It will be fantastic you created an advanced rust video.

    • @ZeroToMastery
      @ZeroToMastery  6 місяців тому +1

      Glad you enjoyed it! Really makes our day to see comments like these 😊

  • @tonypop1007
    @tonypop1007 Рік тому +2

    This is so clear thank you so much.

  • @paulambrose5442
    @paulambrose5442 5 місяців тому

    Thanks a lot Jayson. Best Rust tutorial I've seen so far. Learnt a lot and really appreciate. Time to build projects and master everything you've taught !

  • @leemack4562
    @leemack4562 Рік тому +1

    best rust course on youtube

  • @Sasidhar_Sam
    @Sasidhar_Sam 6 місяців тому

    Perfect crash course to start with the Rust programming. Thanks for the video and Great work!

  • @tiagogamer2540
    @tiagogamer2540 29 днів тому

    Man that enum with additional data hit me like shovel bazooka. I mean, it is basically dataclasses but seeing it just fully packaged into enums is fantastic.

  • @ERAYKAAN850
    @ERAYKAAN850 Рік тому +2

    Love this course. Can you do more with rust? Like more references, libaries etc

  • @antelope6826
    @antelope6826 8 місяців тому

    This was awesome, thanks for all of the helpful examples! Just getting started with Rust and excited to learn more after this

  • @aminebouramada
    @aminebouramada Рік тому

    this is the best rust crash course i ever seen in youtube thanks alot

  • @mahendranath2504
    @mahendranath2504 Рік тому +1

    Wow, thanks for sharing the knowledge, thanks a lot

  • @worldwar_two2894
    @worldwar_two2894 Рік тому

    very gooooooooooooooood! work.
    i hv struggled to get very good content about rust on YT but seems u gave me the utlimate answer to my struggle.
    i won't struggle no more!

  • @hime_no_orenji6116
    @hime_no_orenji6116 Рік тому

    Come to Brazil to teach us in our university. We need more professors like you. Great video!!! Helped me and my boyfriend a lot!! :)

  • @barnabassolomon1629
    @barnabassolomon1629 10 місяців тому

    I wasnt going anywhere with their book whe i reached ownership and borrowing. Your explanation was concise and super understandable. Bless u.

  • @superhero-train
    @superhero-train Рік тому

    At this point I'm only 3 hours in but I just have to say that this is by far the best Rust course I have seen. Thanks for the great work guys.

  • @pici24
    @pici24 Рік тому

    ....I'm new to programming and I'm trying to learn Rust. Over internet, the informations about Rust and things related to Rust, like VS, are truncated, incomplete and/or not explicit enough for programming beginers, because is suppose to adress to people that already have a programing knowledge base. Also, I''ve just started with your video and I have a feeling that your content is pure gold for newbies like me and perhaps not limited to ! I'll check back later, when I'm done studying your work, to confirm it ! :))
    Good job, thank you !
    PS Also, I've subscribed to your channel !

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +1

      We are so happy to hear it! You’re going to love it! 😊

  • @tushar8133
    @tushar8133 5 місяців тому

    THE BEST RUST TUTORIAL. Thank you for sharing your knowledge with us!

  • @memze1148
    @memze1148 9 місяців тому

    Thank you so much for this awesome course for FREE!! I like how you implemented the exercises, my only problem is that you talk about the obvious too much, but other than that this is the best Rust course I've seen so far, and I've seen a bunch that made me sleep in like 2 mins.

    • @ZeroToMastery
      @ZeroToMastery  9 місяців тому

      Hey, thanks for the kind words!
      This crash course is only a portion of the complete rust course we offer. Which is why your noticing simpler concepts. In the complete course we dive into very advanced topics. I'll link it down below incase you want to check it out 😊
      zerotomastery.io/courses/learn-rust/

  • @ashishkumawat6110
    @ashishkumawat6110 10 місяців тому +1

    I would love to have a JSON tutorial from Jayson some day...

  • @AntoineT-v5o
    @AntoineT-v5o Рік тому

    Brilliant, thank you so much. This is from far the best Rust course!

  • @CODINGUZZ
    @CODINGUZZ Рік тому +1

    Thanks a lot Jason Broody

  • @inspacesilence
    @inspacesilence Рік тому +2

    Slowly but loving rust 🦀❣

  • @SleepyBakedCustard-rd8hl
    @SleepyBakedCustard-rd8hl 8 місяців тому

    thank u so much i am learning because of your teaching style

  • @chukwuemekaromanus5302
    @chukwuemekaromanus5302 2 місяці тому +1

    FR i needed to drop this comment , this is like the best course i have seen on rust

  • @SurilVara
    @SurilVara Рік тому

    Thanks for making this challenging language easier to digest!

  • @niketyende
    @niketyende Рік тому

    The course content was very well articulated. Thanks :)

  • @jeremietamburini
    @jeremietamburini Рік тому +1

    Beautiful course, everything so well explained!! Best course for Rust beginners I've seen 😃👍

  • @bertustenhoor9416
    @bertustenhoor9416 Рік тому

    3:53:00 - shouldn't you mention the solution with an if else branching in the vector exercise? I got an extra error there on "item == 30".

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Hey, I would recommend sending this question over in our discord channel, specifically the rust chat.
      There are Instructors, star mentors and other students will be able to help you with any questions you have. Hope this helps 😊
      zerotomastery.io/community/developer-community-discord/

  • @davetearle364
    @davetearle364 9 днів тому

    Brilliant thanks. Well presented, excellent pace and comprehensive enough to get me going in Rust :>)

  • @timursahin3993
    @timursahin3993 Рік тому

    Thank you my friend. Perfect video about rust for me.

  • @bishwasbh
    @bishwasbh Рік тому

    3:53:35 I had a question. While looping through `for num in &my_numbers` , is the `num` going to act as a borrowed element? Like while comparing it with if..else, I had to use &30.
    Like:
    ```
    fn main() {
    let my_numbers = vec![10, 20, 30, 40];
    for num in &my_numbers {
    if num == &30 {
    println!("thirty");
    } else {
    println!("{}", num)
    }
    }
    println!("len: {}", my_numbers.len());
    }
    ```

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Hey, I would recommend sending this question over in our discord channel, specifically the rust chat. There are Instructors, star mentors and other students will be able to help you with any questions you have. Hope this helps 😊

    • @bishwasbh
      @bishwasbh Рік тому

      @@ZeroToMastery Where can I get the discord channel?

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      @@bishwasbh zerotomastery.io/community/developer-community-discord/

  • @bagumamartin
    @bagumamartin 4 місяці тому

    Hands down, best resource!

  • @user-d5f38a2c
    @user-d5f38a2c 9 місяців тому

    Well made. Clear. coherent.

  • @kmaximoff
    @kmaximoff 8 місяців тому +1

    Amazing course! 🤟💌

  • @pietraderdetective8953
    @pietraderdetective8953 10 місяців тому

    This is amazing!
    Can you make one for Zig as well?

    • @ZeroToMastery
      @ZeroToMastery  10 місяців тому +1

      Thanks! We currently don't have a course on Zig, but it may or may not be coming soon 😉

  • @AbelFikadu-lt1ei
    @AbelFikadu-lt1ei 5 місяців тому

    This is the best tutorial ever!!!😄😄😄

  • @sudo0x18
    @sudo0x18 9 місяців тому

    Thanks a lot for such efforts in making such course videos.
    Learnt a lot ♥

  • @HonkyTonkWhiteBoi
    @HonkyTonkWhiteBoi 3 місяці тому

    possible the best Rust course available to date

  • @simbolla13
    @simbolla13 8 місяців тому

    Super video , i am tester but I am able follow these videos easily

  • @okonkwo.ify18
    @okonkwo.ify18 8 місяців тому

    This guy is the best teacher in the world

  • @vonderklaas
    @vonderklaas Рік тому

    Thanks buddy, using this tutorial to learn

  • @SilvestreVivo
    @SilvestreVivo Рік тому +1

    I think this is by far the best Rust tutorial for people landing in the Rust ecosystem. Thanks so much!

  • @prakhargupta4347
    @prakhargupta4347 11 місяців тому

    very good course!! helped me a lot

  • @RyanKane
    @RyanKane 10 місяців тому

    In the final exercise i.e. a19, the conditional should actually be `if *qty == 0` instead of `if &qty == 0`. While both work because of Rust's flexible pattern matching and automatic dereferencing in patterns, the former is generally preferred for clarity and consistency with idiomatic Rust code.
    For my attempt, I performed a match on the quantity i.e. `match *qty { 0 => , _ => }`. I feel like this was more succinct and demonstrates Rust's pattern matching vs a traditional if-else.

  • @blokche_dev
    @blokche_dev 2 роки тому +1

    Thank you! ❤

  • @sephirothu1290
    @sephirothu1290 8 місяців тому

    The best !!!
    Thank you so much

  • @combustionFreeEngine
    @combustionFreeEngine 9 місяців тому

    thanks brother!

  • @utpalmondal2355
    @utpalmondal2355 Рік тому

    An awesome course!

  • @shinn-tyanwu4155
    @shinn-tyanwu4155 Рік тому

    Outstanding thanks 😊

  • @rino19ny
    @rino19ny Рік тому

    1:00:00 why use the token "{:?}" and not just directly like this "println!(result);"

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +1

      Hey! println requires a static string literal as it's input (like "hello"), which it then uses to figure out what to print. this cannot be a variable and it has to literally be something in double quotes.
      Once println has a string literal, it uses that to perform substitutions like replacing {:?} with some debug-formatted data. this is computed when the program is compiled, which is why you aren't able to use a variable like 'println!(result)' directly.
      You could also use 'println!("{result:?}");' as a shortcut for 'println!("{:?}", result);'. there is also another token "{}" which is for production printing. "{:?}" is for debugging contexts and the output may change in the future.
      I recommend you check out doc.rust-lang.org/std/fmt/index.html for all the different ways you can use these tokens to change how the output gets displayed.
      Hope this helped 😊

  • @ashpreetsinghanand7260
    @ashpreetsinghanand7260 Рік тому +1

    Please upload full course

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Hey, the full course is available on the Zero To Mastery platform. I'll link it down below 😊
      zerotomastery.io/academy/

  • @namesurname__
    @namesurname__ 10 місяців тому

    hey!
    thx for the vid!
    what syntax highlighting extension do you use?
    I love how it looks like

    • @ZeroToMastery
      @ZeroToMastery  10 місяців тому

      Hey, can you please provide a timestamp for reference? 😊

    • @namesurname__
      @namesurname__ 10 місяців тому

      @@ZeroToMastery The whole video itself actually. I mean the syntax highlighting in your vscode, e.g. that fn is blue, let is red, floating point numbers are violet etc

  • @ADarnSmore
    @ADarnSmore Рік тому

    2:32:07
    i did this
    fn create_tuple(x: i32, y: i32) -> (i32, i32) {
    return (x, y);
    }
    what was the point of the function here if he just hardcoded it into the tuple

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +3

      Hey! The exercise is to show how to create a tuple and how to access the members of the tuple using destructing with the let (x, y) = coordinate() binding. Whether the values are hard-coded or not doesn't impact how tuples get used. Hope this helped 😊

  • @Codian-ug7gg
    @Codian-ug7gg Рік тому

    Thank you so much

  • @ezeugwunweze6065
    @ezeugwunweze6065 Рік тому +2

    at 48:58 there was no explanation for how the activities folder came about

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +4

      Sorry for the inconvenience Eze, you can download the latest copy of the exercise files at the repository below 👇🏻
      github.com/jayson-lennon/ztm-rust

    • @ezeugwunweze6065
      @ezeugwunweze6065 Рік тому

      @@ZeroToMastery Thanks a lot

  • @jaimeguzman9063
    @jaimeguzman9063 Рік тому

    Great course, I am really enoyoing it. I just have one question, how did you make the termial look like that?

    • @ZeroToMastery
      @ZeroToMastery  Рік тому

      Thanks Jaime! Are you using Linux, Mac or Windows? Each system has a slightly different way to customize the terminal. 😊

    • @jaimeguzman9063
      @jaimeguzman9063 Рік тому

      @@ZeroToMastery I am using Mac

  • @sjsjsjjsjsjsskksksksks
    @sjsjsjjsjsjsskksksksks 4 місяці тому

    Thankyou so much 😊❤grateful 💯👋

  • @toosweetham
    @toosweetham 6 місяців тому

    finally, one that i understand

  • @klubuntu
    @klubuntu Рік тому

    Thanks you for longest but professional course

  • @Dr.Cosmar
    @Dr.Cosmar Рік тому +1

    Pro tip.... turn off code-whisperer... or it'll just answer everything for you.
    That might be ok for some, it's %99 of the time exactly what I was thinking, the other %1 I'm thankful it suggested it, and I try to understand what is going on with it's suggestion.
    If I can't understand the code, I don't use it. Generally.
    When it comes to complex math... forget about it.

  • @derecwilsom4546
    @derecwilsom4546 Рік тому

    Outstanding content, thank you

  • @rino19ny
    @rino19ny Рік тому

    23:45 when to use {:?} in a println macro?

    • @ZeroToMastery
      @ZeroToMastery  Рік тому +2

      Hey! Using {:?} in a println macro is when you want to display some data in debug format. This is fine for development and testing, but for a production application prefer to use {} instead. You'll need to implement the Display trait in order to make use of {}, and it is considered the "stable" interface for printing things. The output of {:?} may change at any time.
      Hope this helped 😊