Should you learn Rust in 2024?

Поділитися
Вставка
  • Опубліковано 1 чер 2024
  • Considering learning a new programming language in 2024? In this video, let's explore whether Rust is the right choice for you. Join me as I weigh the pros and cons, offering insights to help you make an informed decision about delving into Rust in 2024.
    Free Rust cheat sheet: letsgetrusty.com/cheatsheet
    Chapter:
    0:00 Intro
    00:12 Language & Ecosystem
    2:24 Community growth & Industry adoption
    4:47 Language alternatives to Rust
    6:37 Job opportunities/growth
  • Наука та технологія

КОМЕНТАРІ • 449

  • @letsgetrusty
    @letsgetrusty  5 місяців тому +19

    📝Get your *FREE Rust cheat sheet* :
    letsgetrusty.com/cheatsheet

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

      My dude are you going to release the bootcamp for Rust soon?

  • @antonsakhanovych1917
    @antonsakhanovych1917 5 місяців тому +144

    "Imma give you my completely unbiased answer!" - Let's Get Rusty

  • @rubencashie9441
    @rubencashie9441 5 місяців тому +86

    I love both Rust and Zig.
    I’d probably use Zig for things where I need more fine control over something like memory: how and when allocation / deallocation happens for example. Sometimes you just don’t feel like fighting the borrow checker.
    Zig’s approach to compile time execution of code is refreshing and makes macros look like insanity
    I recommend spending some time with Zig.

    • @realfootball338
      @realfootball338 5 місяців тому +6

      Zig ❤ it can be easel added in existing c/c++ projects. Write C bridges for C++ is easy. Set up compiler also. Cool 😄
      About Rust why Webassembly developers that developed rust - didn’t create it support safety threads in webassembly ?

    • @letsgetrusty
      @letsgetrusty  5 місяців тому +10

      Thanks for sharing your perspective!

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

      ​@@letsgetrustyreserve the youtube name LetsGetZiggy just in case in the future 😅

    • @CorneliusCornbread
      @CorneliusCornbread 5 місяців тому +11

      Zig is an absolute must in certain applications. I don't remember where but a while back I read an article about someone who implemented a language VM in both Rust and Zig, VMs are an incredibly memory intensive application, and they ended up 99% of the time writing unsafe Rust. Rust, least as far as I can tell, has zero benefit over Zig when you're writing purely unsafe code. If you're going to be writing unsafe, might as well write it in Zig where the language lends itself best.

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

      @@CorneliusCornbreadI know nothing about Zig. From what you say, it seems like there is room for both, depending on the nature of your problem.

  • @Mateusz143
    @Mateusz143 5 місяців тому +59

    A channel devoted for Rust trying to answer this question is like asking a barber if you need a haircut 😂 let's be real

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

      🤣

    • @catto-from-heaven
      @catto-from-heaven 5 місяців тому +4

      He used to make useful videos. Now he's just a fanboy

    • @letsgetrusty
      @letsgetrusty  5 місяців тому +11

      It's okay you can trust me

  • @the_flask
    @the_flask 5 місяців тому +81

    Zig is intended to be a replacement for C. Also it is beginner friendly(in my opinion compared to rust) and go to language for someone wanting to dive into low level programming.

    • @letsgetrusty
      @letsgetrusty  5 місяців тому +22

      Why would you use Zig over Rust for low level programming?

    • @CSm.a
      @CSm.a 5 місяців тому +34

      ​@@letsgetrusty its just better

    • @CoolestPossibleName
      @CoolestPossibleName 5 місяців тому +3

      I came here to say that

    • @ashutoshchar940
      @ashutoshchar940 5 місяців тому +17

      ​@@letsgetrusty Zig is faster than rust

    • @the_flask
      @the_flask 5 місяців тому +38

      @@letsgetrusty Easier learning curve i guess . Like i made my own http server in just 2nd day of learning zig whereas in rust i didnt even completed one(simple http server in rust) as it got more complex and ended up switching to zig :/.

  • @icanonlysuffer
    @icanonlysuffer 5 місяців тому +43

    I personally find Zig as a better replacement for C, and Rust as a better replacement for C++. I use Zig for making small programs, it makes tiny binaries with no linking needed around the size the same program written in C, and I use Rust when I need to make something to never ever break and deal with networking stuff. I've used size optimizations for Rust but the binaries are still pretty big compared to the Zig ones, I hope the binary size for smaller Rust programs is reduced in the near future. I love both languages!

    • @venkatabhaskararao4061
      @venkatabhaskararao4061 5 місяців тому +4

      thats what i am doing as well! great

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

      What makes the rust binary so big?

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

      @@reed6514 its standard library, it's around 300KiB so every program ends up being over that size, even a simple hello world. In the other hand Zig only compiles what it uses (as far as I know) so the binaries end up at around 18KiB-40KiB for small programs.

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

      ​@@reed6514debug information, native support for unicode (this brings some big metadata tables into the binary), additional machinery to print nice backtraces on panics, etc.

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

      A mature post. Too many people are zero-sum!

  • @pierreollivier1
    @pierreollivier1 5 місяців тому +26

    To answer your question about why Zig, I think the main point about Zig it's the ease of use, and philosophy of the language. Here is a list of reasons why Zig is a better alternative than Rust for low level programming.
    1 - Type safety vs Memory safety. The main reason for C and C++ being unsafe is their lack of Type safety, which is what leads to Memory safety, so while Rust is fixing the symptoms, Zig is fixing the root of those problems, by not allowing UB, not allowing freely casting everything to everything, having parameter const, and having strict rules regarding the type system. So the difference is that Rust Borrow checker, won't let you do stuff even if you know it's fine, whereas Zig's compiler will let you do whatever you want as long as during compile time you can prove that your code is type safe.
    2 - Learning Curve. One of the big problem that I foresee with Rust is that the market will ask for more and more Rust developers, but the market will have a hard time providing good Rust developers. It's easy to learn the basic of the language, But it's very hard to master and write good Rust code. I've learned the basic of Zig in maybe a week or so, It's very easy to pick up despite having incomplete documentation and a general lack of ressources to learn from. So for companies later it will be easier to either take old C/C++ developers and train them to use Zig or recruit new devs, than it will be to recruit or teach Rust.
    3 - Performance. While Rust is a very performant language, writing performant Rust code is not easy, especially the closer you get to the metal, which goes back to my previous point, that Rust expertise will be very rare.
    4 - Relative Cost of switching. While Rust can interop with C/C++ it's far from seamless, and natural, Whereas even in it's pre-release form, importing and using both C/Zig is seamless in both way. Converting a Makefile to a buil.zig takes less than 10 minutes if you are new, and once Zig get's a package manager, switching to Zig even just for the tool chain will be a no brainer, It's already the case, projects, like Raylib already switched the Cmake/Make hell to Zig and this is just one example.
    5 - Zig is a fully imperative language, which most C/C++ developers prefer, as it fits their brain better, Zig just takes the good stuff from functional languages and OOP languages, without making it a wannabe C++, which is what Rust is, Rust is a better C++ and it's a very powerful language, with a very mature toolchain and community, Rust has definitely a place in highly performant software, but definitely not in Low level system programming, it's still crazy to me that Rust was allowed in the Linux Kernel. Because to be honest I don't see any languages better fitted to be a kernel language than Zig, with it's allocators as first class citizen design, explicit control flow, lower-level access than C, strong type safety and meta programming capabilities and the seamless interop makes it an obvious choice. In the future I'm sure it will replace most of the C kernel code.

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

      I love everything that you’re saying, but I want to start developing my own game engine and prepare for a modern game dev Industry and I can’t tell if zog or rust have more potential there.

    • @gigachad8810
      @gigachad8810 5 місяців тому +4

      So if I understand your 1st point correctly, you're saying that Zig is Type safe and therefore Memory safe, while Rust is Type safe && Memory safe. How is that a pro? Also, saying that the lack of type safety leads to memory safety is plain wrong. what about double frees? use after free? etc etc
      Also, Zig still has UB.

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

      @@gigachad8810 It's a bit weirdly formulated, but my point was that the main reasons for C/C++ problems don't come from memory safety issues, rather memory safety issues come mostly from the lack of type safety of those languages. For the longest time people a trick that programmers would do is use the fact that malloc don't give you exactly the quantity of memory you ask for to store data outside of what they asked for. or they would use a header variable in their struct do determine it's type and cast it around like it's nobody business, having void pointers pointing to god knows where, and macros for generics, I means it's ridiculously bad. I'm glad languages like Rust are taking a strong stance for memory safety It's great and important. But rust approach is to have a strongly typed language on top of having a very heavy memory ownership model and lifetime. Which is awesome when you are concerned about correctness, but can impair productivity and expressiveness. This is where Zig's shines. Zig is a strongly typed language, that learned from what C devs used to do in a very unsafe and error prone way, and build upon it. Now you don't need to loosen the type safety of using void* everywhere to get a genericish behaviour, instead you use comptime. Now you don't have to worry about namespace conflict, It's in the language, you can't truncate a value through assignment anymore so you can't be lazy and shoot yourself in the foot anymore, you have to use builtins. You can't modify the parameter of a function anymore you have to make a local copy and let the compiler remove it. It's so many stuff that Zig does that sort of let you write code the way you are used to while also giving you 90% of the safety that you can get in Rust. This is why I don't see Rust scaling at the mainstream level, because the Borrow checker is just overkill for most situations, unfortunately that's part of the language you can't just remove it, in Zig you can just call built ins to make everything behaves just like C again.

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

      @@jbq In the grand scheme of things I don't think it matters that much both languages are good to learn, I would choose Zig if you are more beginner because, It's easier especially if you have a background in a C like syntax. But rust is more polyvalent, and mature which could also mean that for your career it would be more useful. It depends on your situation.

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

      @@jbqzig does not have operator overloading, which makes common vector math operations easier.

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

    I've worked on some embedded systems over the course of my career. I've never use dynamic memory allocation in an embedded system (or needed to) for the following two reasons. One, what would you do if a memory allocation failed? That just can't happen. Two, embedded systems are typically intended to do a specific task and so you know the worst cast memory requirements for that task and can allocate the necessary memory statically up front.
    This makes a primary feature of Rust, memory safety, not as important for embedded systems. Sure, go ahead and use Rust. But C and C++ are still good and not as much of a detriment in embedded systems compared to Rust.

  • @gauravv912
    @gauravv912 11 днів тому

    I'm currently a compE student at Purdue who's been learning C for the past 2 years. This summer I got an opportunity to work with a professor on a Rust project. Thank you for the amazing vids and tutorials that have helped me to learn the basics!

  • @Diragonix
    @Diragonix 5 місяців тому +260

    ai, crypto, and fintech are the three worst industries to use as examples lol

    • @TonylerChan
      @TonylerChan 5 місяців тому +16

      It's the future though.

    • @JorgetePanete
      @JorgetePanete 5 місяців тому +30

      Explain why AI would be a bad example

    • @arnesl929
      @arnesl929 5 місяців тому +12

      «That go bankrupt In a year»
      (Edit -programmers are also human)

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

      ⁠@@JorgetePanetePython + C/C++ are already the landscape and I don’t see that changing anytime soon.

    • @qtDiabolik
      @qtDiabolik 5 місяців тому +20

      blud thinks agi is going to be written in python 😂😂💀💀💀💀

  • @lixunlin
    @lixunlin 4 місяці тому +2

    People has been saying it’s the best time to learn rust but it is not and will never be the mainstream

  • @kriscarr2442
    @kriscarr2442 5 місяців тому +18

    Rust is much more a C++ replacement than C. Zig is a C replacement for low level once it gets more mature. Zig is C with some helpful guard rails that don't get in the way and better tooling. It comes down to Rust being way too strict/awkward once you go below a certain level (entering C-world rather than C++ world) and unsafe Rust language needs a lot of work, my kingdom for "->" deref syntax. Microsoft are also moving their "C++" to Rust, not their C, though you see it written as "C/C++" a lot, they don't mean both.

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

      yes, please. postfix pointer dereference would be so nice....
      as to microsoft I though they were using their own C dialect in the kernel...

    • @scitechplusexplorer2484
      @scitechplusexplorer2484 5 місяців тому +3

      What about Linux kernel? It completely C, but Rust penetrating there too!
      It's a myth that Rust is replacement for just C++, not C. Rust is alternative for both C and C++.

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

      @@scitechplusexplorer2484 There is no Rust in the Linux kernel yet, just the toolchain. See Torvalds interview a few weeks ago on Rust impact in Linux kernel: ua-cam.com/video/YyRVOGxRKLg/v-deo.html
      Rust is not a replacement for C. However, that does not mean Rust cannot do the things C can, it is an alternative. Rust is a replacement for C in the same way C++ is. They are just a pain or are impractical for anything truly "requiring" C. In Rust's case this is due to the lack of nicer syntax and features within the unsafe Rust language, which is needed due to things not being expressible in safe Rust without defeating the purpose, usually by sacrificing resources in some way.
      Ever since Microsoft began buying into Rust hard about 3-4ish years ago, the language has progressed further than in the previous 10+ years so give it a few more years for work on safe Rust to peak a bit and for focus to shift onto the unsafe Rust language. There is also a lot that can be done in the Kernel in Rust that is currently in C that doesn't "need" to be in C, but is due to having been the only available language.
      Zig is a long way off being suitable and I see it more likely that Rust will be improved to fit better rather than allowing Zig as a third language in 5-6 years time.

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

      @@scitechplusexplorer2484 even if its true no company is going to switch thats for sure, C is not going anywhere, i like rust but its extremely overhyped, in the wilds of the real world barely anyone know what it is let alone use it

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

      @@scitechplusexplorer2484 Rust is very complex and "too" memory safe. What I mean is that for programs that require fine memory control by their nature, such as say an OS, Rust is a burden. If you read Linux kernel code you'd quickly realize 90% of it would need to be written in unsafe rust. If you were to write in in safe rust it either would not be possible or would be painfully slow. Zig bridges this gap, Rust does not.

  • @DinoFancellu
    @DinoFancellu 5 місяців тому +14

    I'm relearning Rust now, and I'm an experienced Scala dev. I'm looking for a culture that is less academic, more pragmatic, but still allows me to write high level code.
    Rust is surprisingly similar to Scala , it has ADTs, type classes, generics etc, extensive use of Option and Result (Its version of Either)

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

      Coming from .NET and some familiarity with F# I found it partly familiar. Also done C++ and C but not in many years.

    • @thefamily512
      @thefamily512 4 місяці тому +1

      Don't bother, HTMX is the more marketable skill. It replaces rust, node and angular.

  • @Rithsomware
    @Rithsomware 5 місяців тому +3

    wanting to get into algo trading and hft and other financial things in 3-4 years, should i learn rust or c++

  • @magicomiguel921
    @magicomiguel921 5 місяців тому +54

    Great video! On a side note, I agree with you, as a Software Engineer coming from Node/Python, it's hard to find "Entry Level" Rust jobs.

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

      Hopefully LGR can help alleviate this problem in the near future!

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

      Ditto from the Microsoft development stack.

    • @Heater-v1.0.0
      @Heater-v1.0.0 5 місяців тому +3

      I have heard from plenty of companies that are using Rust and hire experienced software engineers that have never heard of Rust. The important point being that you know how to design software and build software likely with plenty of experience in whatever other languages and/or have good domain knowledge. It is expected such hires can pick up Rust easily enough, perhaps with some training.

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

      @@Heater-v1.0.0 i wish this was true

    • @Heater-v1.0.0
      @Heater-v1.0.0 4 місяці тому

      @@sharkpyro93 Are you suggesting that what I say about my own experience is not true? How could you possibly know that?
      I'll assume you did not mean to be so rude and meant to say that it is not your experience or not as common as one would like.
      As it happens I am currently using Rust full time at a company that has just adopted it having no previous experience of Rust myself before.

  • @JohnDoe-ef4fm
    @JohnDoe-ef4fm 5 місяців тому +2

    Rust Loco is the missing puzzle for rapid web app development in Rust (APIs at least)

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

    already started building projects in rust

  • @NeerajSingh-kg3uk
    @NeerajSingh-kg3uk 4 місяці тому +1

    Please show the difference between actix web and axum which one it better and where exactly we have to use tokio library.. we can tokio separate only or can use it with actix or axum

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

    4:56 I fell out of my chair, excellent work. keep it up.

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

    I like Rust and been using it for years (not at work tho), but I do feel like its mainly a C++ replacement. On one hand, a good C++ dev doesnt really need Rust. On the other, I wouldnt encourage a young beginner to choose C++ over Rust these days because C++ is complex but not for good reasons.

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

      i mostly agree. however, if we look at it transitively then C++ is a replacement for C and Rust a replacement for C++ which implies that Rust is a replacement for C (all of this obviously isn't true in practice)

    • @Heater-v1.0.0
      @Heater-v1.0.0 5 місяців тому +2

      I keep hearing that "Good C++ devs don't really need Rust". Usually from people who think they are good C++ devs. But the statistics on bugs and security vulnerabilities cause by mistakes in writing C++ coming out of MS and others show that their devs need something better than C++. I'm assuming the likes of MS are hiring some of the best C++ devs.

  • @bytejunkie64
    @bytejunkie64 2 місяці тому

    I think you should give Zig a chance. Even if it's only to use zig cc. At the very least, the tooling build around zig is pretty impressive, and has solved problems Rust and Go still struggle with, or aren't a part of their missions to solve.

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

    Hay, one request, can you give your view point on MIR optimization in rust ?

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

    In my view, Yes! and I love 💕 to use.

  • @dawnrazor
    @dawnrazor 5 місяців тому +26

    There’s a huge elephant in the room which I was hoping you were going to mention and that is the failing leadership in the rust foundation that has given rise to the crablang fork that happened earlier this year. I have been trying to decide whether it is time for me to have a second attempt at learning rust as my previous attempt about 3 years ago failed mainly due to the difficulty in my battles to appease the dreaded borrow checker. Now that rust has matured somewhat and there are are more tools for learning such a language such as ChatGPT, I would like to give it another shot, but having recently learned of missteps by the rust leadership makes me wonder if I should just stick with golang (even given it’s short comings). I’m seriously worried about the potential fragmentation of the rust community as a result

    • @Heater-v1.0.0
      @Heater-v1.0.0 5 місяців тому +5

      There is no "elephant in the room". Perhaps a mouse. The Rust Foundation is a new thing finding its way. It has the impossible job of trying to please all kind of people pulling in all kind of directions. Sure mistakes happen, fathers get ruffled. With large entities like MS and AWS getting into the scene I'm pretty sure things will be force to become more professional.
      By the way, I cannot imagine asking ChatGPT is a good way to lean Rust. Read the book, write some code, do experiments. Besides where is the fun in having a machine "understand" things for you?

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

      I ask a lot of clarifications for concepts that I can't get to wrap my head around ; ChatGPT is the guy that will answer without judging you @@Heater-v1.0.0

    • @justsomeguy8385
      @justsomeguy8385 4 місяці тому +3

      The Rust community is so dramatic. The Rust foundation has been pretty dumb, but they've also course-corrected whenever they messed up. And no matter what happens, crablang will likely always just be a Rust fork, so you'll be using Rust either way.

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

      Just stick with Go... otherwise learn C or C++..

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

      @@justsomeguy8385 Yea but they are woke, that's more important!

  • @neerosity
    @neerosity 5 місяців тому +3

    any way to reduce compilation time ? for a minor change in code it takes approx. 5sec which overall becomes very time consuming example for yew framework we have to wait more as compared to reactjs.. or actix web as compared to nestjs

    • @user-uf4lf2bp8t
      @user-uf4lf2bp8t Місяць тому

      I think its just kind of what comes with a compiler that keeps track of and checks so much stuff

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

    Nice video man! Just one suggestion, please make videos more frequently on Rust!

  • @ali-d-coded5620
    @ali-d-coded5620 4 місяці тому

    which one is best for fast and performant backend Actix web or Axum???

  • @dinckelman
    @dinckelman 5 місяців тому +4

    This year I’ve attempted to use Rust for adventofcode, and honestly it’s a good time. I was originally using Go, but it’s just not for me. Very mature tooling, but a ton of QoL is missing

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

      You chose wrong then, the greatest minds in computer science created Go... Rust was created by a bunch of SJWs lol

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

      ​@@jazzycoderclearly haskell is just superior

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

      @@zweitekonto9654 Haskell is an academic's vanity project, not a general purpose language.

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

      @@jazzycoder everybody saying that is just coping from skill issue.

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

      @@zweitekonto9654 You sound like a newbie.. I programme in Arm6 / Z80 Assembly & C and about 7 high level languages.. i've been doing this for 30 years.

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

    Recently I heard an opinion that rust’s async and coroutines are immature. What do you think? Thanks!

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

    I clicked on this video because I wanted to see if it was a good investment of my time to continue to learn Rust. But the comments have convinced me to try out Zig.

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

      I'm in the same boat, kinda thinking zig is the better way to start

    • @d3f3kt57
      @d3f3kt57 2 місяці тому

      @@fusion9619I ended up installing Zig and then quit after 30 minutes, just didn't feel like learning another language. I stayed with Rust, because I actually really like the language, how it is designed, and cannot relate to the commenters struggling with the borrow checker. Finally managed to finish a real programming project with it.

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

    I don't think calling C/C++ a gas vehicle and Rust an electric vehicle is as great an argument as you think it is. I'd personally compare C/C++ to sailboats and Rust to a modern freighter. Both doing the same things, with Rust far safer and more reliable.

  • @NoradNoxtus
    @NoradNoxtus 4 місяці тому +1

    Ultimately it seems Zig will be the one to win out. Doesn't have idiosyncrasies and doesn't require you to rethink how to program.

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

    When Java was one year old, they were looking for developers with three years of experience.

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

    What do you think about Rust in desktop / android app development. I'm a JS Dev.

  • @angkhoi5740
    @angkhoi5740 4 місяці тому +6

    I don't understand why you said GO is not memory safe (6:10) ? I mean it has a garbage collector... So technically it's safe or did I get it wrong ?

    • @_adityahirani
      @_adityahirani 2 місяці тому

      Yes but its garbage collector is garbage

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

    When I mentioned having learned Rust entirely on my own and using a kernel tutorial (thanks, Philipp Oppermann) as the main learning material for it to my computer science professor (Michele Rousseau at Saddleback College), to say she was impressed would greatly understate it. And of course, as a cybersecurity minor, learning Rust helps to make it much easier to understand how vulnerabilities arise in the first place.

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

      Oh dear !
      As a cybersecurity student, I hope you are aware of the speculative execution buffer overread vulnerability that can be used to access data outside the bounds of an array.
      It’s the most common attack vector used to steal credentials, so I guess your professor must have covered that in your cybersecurity course ?
      Question: what does safe rust do prevent leaking data from this most common form of attack ?
      Answer: it doesn’t! Safe rust has the exact same vulnerability as unsafe C or C++. You can fix the problem pretty easily in C/C++
      In Rust, you might be able to fix the bug without triggering the borrow checker, or you might just have to wrap all your array accesses in unsafe blocks to rewrite the vulnerable code.

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

    2:00 is what I wanted to do to the borrow checker.

  • @vajadatiashvili1939
    @vajadatiashvili1939 4 місяці тому +1

    What about learning Rust as your first programming language? ( i’m leaning it😅)

  • @clementdato6328
    @clementdato6328 5 місяців тому +3

    Go is gc, it should be safer no?

  • @justsomeguy8385
    @justsomeguy8385 4 місяці тому +3

    The reality is that if you want to use Rust in a salaried role, you are better off learning C++. Most Rust developer jobs are with companies using an existing C++ codebase and wanting developers who can work with their legacy code. That's assuming you aren't willing to take jobs in blockchain development.

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

    Learning now!

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

    I don't understand why Rust is often recommended for CLI apps. Doesn't it depend on the nature of apps? My team works with a zillion line codebase of a system of CLI apps that work on a large database, generates emails and PDFs, mails them, creates directories of files, generates reports/xml, transports data over https and tcp, ..., .etc. It is currently implemented in TCL and C. It is very old. We are planning to modernize it and are considering Java/Groovy/Scala or Python. Why would we consider Rust? It appears much more complicated than even Scala. I don't see why managing allocation and freeing memory yourself is a desirable thing.

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

      Rust is memory safe.
      Anything that needs to be 100% reliable such as backend systems and high performance such as game engines benefit from Rust's memory system.
      If your building something you don't wanna touch again for months after you consider it complete, rust is a good option due to its dependency systems.
      On the flip side if you just need a quick and dirty method to achieve something there's no reason to use rust.

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

    I've ben writing Rust for a few months now and, though it's very ugly and there are lots of annoyances, it's easily my favourite language rn. I wish I could write everything in Rust haha.
    Async traits are handy but you can't do dynamic dispatch on them - which is a big reason why I use traits. Trying to create a plugin system where the trait is the interface plugins adhere to is pretty tricky for this reason.

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

      I have made a small service in production where i used an #[async_trait] for dynamic dispatch even far before 1.75.

  • @niels.faurskov
    @niels.faurskov 5 місяців тому +10

    "major breaking changes in a backwards compatible way" 🤔 Which one is true? :D

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

      Both 🤯

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

      Forward compatible changes breaking backwards compatibility? :p

    • @sylvereleipertz955
      @sylvereleipertz955 5 місяців тому +4

      This is literally the rust documentation quoted here. You should have a look about rust "editions" to understand what they really mean.

    • @niels.faurskov
      @niels.faurskov 5 місяців тому

      @@sylvereleipertz955 oh this comment is just about the semantics of the sentence :)

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

    Loving it

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

    bro do you know where the person who was running channel go lang dojo went?

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

    Please create full stack rust roadmap for beginners.

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

    Rust compiler works fast for me, but I do not use traits.

  • @schroedingerundkatze
    @schroedingerundkatze 5 місяців тому +6

    The only reason to learn Rust is to have some fun with it. Maybe also if one needs to write programs that usually had to be written in C for performance and other reasons. For all other tasks there are better choices in my experience. At the end you have to get things done in the requested time and quality to get the job and earn money.

  • @PiotrPavel
    @PiotrPavel 4 місяці тому +1

    For Zig lovers: I will wait until be done sothing meaningful in Zig and be at least 1.0. Don't get me wrong if zig is better tool for something I will use zig(after 1.0 version or stable)

  • @codeman99-dev
    @codeman99-dev 5 місяців тому +3

    You don't see a compelling use case for Zig?! That's straight up insanity. The real interop layers in zig is unmatched.

  • @abhishekshimpi214
    @abhishekshimpi214 7 днів тому

    Hii Imma, I am working on web application from last 1 year. I am learning rust from your playlist from last 2 months . I want a job in rust or blockchain technology. What is your advice for me to get job in this field and how can I get it?

  • @publishyours
    @publishyours 4 місяці тому +2

    I was hoping for a better/honest comparison with Zig...

  • @s1v7
    @s1v7 4 місяці тому +1

    the only issue with rust - is that you have just a few job positions on the market, and most of them about blockchain 🦄

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

    for greenfield projects, js or golang is more than enough. for extreme performance (high frequency trading, hard real time stuff etc...) ZIG is crazy fast. 🚀 on the other hand, Rust is "like" a more performant and safer version of Apple's swift language. it has an interesting niche category of itself. it is a systems programming language but has too many useful but sometimes hard to grasp high level abstractions. it doesn't have direct memory manipulation by default, so it is systems language but not low level.

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

    I'm looking forward to the rise of a new generation of languages like Rust, Zig, Go and so forth. The changing software engineering landscape is what makes it worth doing IMO

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

      Me too, I was hoping that kotlin would sort of do that for java, instead it's java that is evolving faster now. While I do like java, I am just tired being force to use his java 8 version and the pill of mess that has been built upon when we have java 21 available today. Add on top of that the conservatism of java devs in generale (which is both good and bad) + oracle extending up to 2030 java 8 support, I am not seeing the change any time soon 😂

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

      @@lufenmartofilia5804 average european corporate job

  • @suikast420
    @suikast420 4 місяці тому +2

    What about stream processing? I am developing a lot of event stream processing services. Some in java and migrating some to golanfg ( because of mem footprint ). My stomache says me that rust can here perform better ( there is no gc ) but I am not sure. Has someone test rust in that are ?

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

      I am using rust in fintech for payments transactions stream events when each event need to be analyzed as fast as possible and assigned fraud/AML score with combination of deterministic rules, anomaly detection and some ai/ml stuff. My main responsibility is sw architect but even after several years break from serious programming my beginner code in rust is with much better performance, safety and additional features than our current java solution. AB testing showed us rust supermacy in this area but problem is to get developers for keeping solution alive 😢

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

    Let's get coursey.

  • @koool56
    @koool56 4 місяці тому +5

    Zig is just better if you need fine control over memory, not only its inherently more complex in Rust, Rust also supports things like operation overloading which are problematic for determining clear program flow. As much as this point of view is hated, I think Rust is a better replacement for C++ then C, Zig does much better job at replacing C.

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

      Zig doesn’t even exist. It’s not 1.0 and the developer makes no promise of when ut will be stable

  • @QmVuamFtaW4
    @QmVuamFtaW4 5 місяців тому +4

    "Languange & Ecosystem" 👍

  • @alijoumma
    @alijoumma 5 місяців тому +4

    isn't the problem with Go is garbage collection rather than memory safety ?

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

      Yep, one of the recommendation by NSA for memory safety.

  • @mr.togrul--9383
    @mr.togrul--9383 5 місяців тому +7

    Before even starting to watch the video, I can just answer it guyz, absolutely learn it, it is the future

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

    This man clearly hasn't experienced the joys of the zig build system.

    • @steveoc64
      @steveoc64 5 місяців тому +3

      And he probably never will.
      Looks like one of those “code guru influencers”, who only lives for the clicks
      YT is congested with them, and the algorithm keeps feeding the monster

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

      Rust is the best for low-level systems programming, backend service, low latency systems, etc.
      Seems like you are on wrong channel! Rust is cool, Rust is awesome, writing Rust code is like breeze, and ownership/borrowing is just mind-blowing(so what if initially its hard, nothing comes without hardwork).
      Also, please don't say to learn/try Zig, we are Rust 'cultists'.😁😇😇😇
      And Rust is the most LOVED language for 8th straight year! Nothing beats it.🙂

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

    Guy that runs a youtube channel about Rust: "I'm going to give you my completely unbiased answer."
    Little late for that.
    I enjoyed the video, but let's be real.

  • @boredstudent9468
    @boredstudent9468 5 місяців тому +3

    A couple of Points for Zig are, a more comfortable work with memory which makes it better if you need raw access for example with micro controllers. Also it's Interoperability with C/C++ is way better as you can just import a header and are ready to go. Also Zig is very usefull as a build system using only the build.zig to help with the mess that is the C ecosystem or when working with FFIs like cgo and linking c into rust.

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

      Marketing is moving away from c++. Zig is waste of Time.

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

    what can rust do to make money?

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

    I am new in the IT field and like every other newbie I am all over the place can you suggest me what to do ?
    I just completed my basics of frontend (html,CSS and js) and my goal in full-stack using js, so should I learn rust and where can I use it? Pls pls reply❤️

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

      No, don’t learn rust. If you are a complete beginner to programming and are looking for a job stick to what you’ve mentioned and learn a framework like react.
      If you have no programming or computer science background, a lot of the concepts in rust will be extremely confusing and you’ll get discouraged and quit completely.
      I would only move to a backend language once I’ve become extremely comfortable with the front-end stack. And even then you can begin using a python framework (again python is very beginner friendly).
      I’ve been coding and making websites for almost a decade and only recently did I feel comfortable to begin tackling low level languages like Rust and C++. Part of that is thanks to ChatGPT, but a big part of that is being extremely comfortable with the surface level coding concepts you learn in languages like JavaScript and Python.
      I’m also not saying wait 10 years to learn rust, you don’t need to wait that long. But by the sounds of it you are a complete beginner so I would wait at least a few years.

    • @alang.2054
      @alang.2054 4 місяці тому

      Get a CS degree

  • @TRY-dm3bd
    @TRY-dm3bd 4 місяці тому

    Bro I am excited by cant use it without vs community most tutorial with vs community can you make video how to install rust in vs code or vim without vs community

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

    Imo you should put Tux instead of Zig on the lower left thumbnail :P

  • @darthcabs
    @darthcabs 4 місяці тому +1

    And you said this is unbiased opinion? It sounds like advertisement

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

    I had a biology background and I want to get more serious about scientific computing and computational biology. Does learning rust could be a good start? I know it’s a low-level language harder than Python and R but does anyone know routine use of Rust in industry and university?

    • @thesenamesaretaken
      @thesenamesaretaken 5 місяців тому +3

      I've been out of the field for a while but unless you're already familiar with them I feel like numpy/scipy would generally be the best place to focus. Scientific computing often boils down to solving massive systems of linear equations and it's unlikely you'll outperform established tools at that.

    • @Gauravmann
      @Gauravmann 4 місяці тому +2

      Just continue on with python

    • @LeChuck.x17
      @LeChuck.x17 4 місяці тому +1

      Mojo could be an option in the future if you know Python

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

      try julia

  • @moriz111
    @moriz111 4 місяці тому +1

    More ad then real unbiased review.

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

    Do you think Rust is good for Desktop applications/2D game development?

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

    I saw you wrote that Go is "Not memory safe"? That doesn't make sense. Go uses a garbage collector. You can't access memory directly. How is that not memory safe?

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

    An important difference between Rust and Go is that Rust is much more suitable for embedded development, i.e. with a non-standard OS.
    Personally, I like Rust MUCH more than Go, because of its much stronger typing system and how that can be leveraged to writer better systems. And while it is low-level enough to replace C, it is also high-level enough to replace C# and Java. That makes it an AMAZING language!
    I foresee a huge growth for Rust, that will increase in speed as more platforms support it. Like Android and the Browser.

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

    I like rust. But I checked a popular website with jobs for developers in my country. And there are only 8 vacancies. 2 of them are not really rust, and 6 are blockchain.

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

    And nim? You didn't cover vs Nim comparison!

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

    i love rust very much, maybe because some videos of you. But i hear that zig is faster than rust. So can you explain why i should choose rust rather than zig. Maybe always new language apeare and better in the furture.

    • @user-zz6fk8bc8u
      @user-zz6fk8bc8u 4 місяці тому

      Zig is not even v1. I wouldn't trust it with any production system because there are no (api/syntax) stability guarantees.

  • @jazzycoder
    @jazzycoder 4 місяці тому +8

    My answer: No.. there's no market for Rust & there are now better languages if you want to be cutting edge - (Zig & soon Carbon) . Also, what's wrong with C & C++ & all the high level languages? Just build stuff and learn your domain & just use the best tools for the job. Rust was designed for a very specific use case - to refactor code in the Mozilla browser.. unless you're doing that then use the domain specific languages we already have & which are battle tested.

    • @momenttomoment2714
      @momenttomoment2714 4 місяці тому +1

      Agree 💯 There are no real Rust jobs

    • @joegoosebass3958
      @joegoosebass3958 4 місяці тому +1

      I looked the other day in UK & there's only 3 Rust roles, all just for Solana / smart contracts ... hardly what a system level language should be used for lol That can be done in any high level langauge.

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

      Windows they replace a small portion of c++ code to rust . Every one know it's capable.

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

      @@akashv678 It's a vanity project for a project manager at Microsoft. As soon as Rust fades out of fashion that small part of the code will be re written in Go or C++ again as required

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

      @@akashv678 The key word in your sentence is "small"... it will probably be replaced of forgotten about down the road when Rust goes out of fashion or we end up in WW3

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

    Yes

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

    Will safety rust doesn’t work in webassembly with threads ?
    If yes I’ll learn. If not - Zig

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

      Why not both? 😉

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

      @@AdamFiregate I code on Python, JS(front/back) and Dart. Sometime trying to find feature from another language 🤪

  • @haliszekeriyaozkok4851
    @haliszekeriyaozkok4851 5 місяців тому +8

    Zig is more faster but it's more c like, because of that i don't sure it's fit for developing big apps. And also it isn't be stable until 2025. I'll give a shot when it'll be stable. Go is an easy language and it's not offering garbage collector and fully functioning guarantee when program compiles. So rust is the best programming language for me.

    • @cysia3683
      @cysia3683 5 місяців тому +4

      why is zig faster, if at all?

    • @catto-from-heaven
      @catto-from-heaven 5 місяців тому +4

      "I'm not sure if it fits for developing big apps". Linux is one of the largest code bases out there, and it's almost entirely written in C

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

      @@cysia3683 all benchmarks shows that.

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

      ​@@catto-from-heaven linux is a massive project that includes hundreds, maybe thousands of sub projects. There is probably no sub project in linux kernel which has 10 thousand lines and many modules.
      That's more testable in web applications, c++ and rust apps written with their frameworks are way more faster than c apps that written with their liblaries.
      If you want to write big projects with maximum optimisation you need to have too many data structures like c++ and rust. If there is not, you simply have do that with way more unefficient way.
      And finally, because of the whole reasons i mentioned, no one makes that 8 gb gpu required games with c, they do it with c++.

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

      stupid web developers. stupid web developers talking about rust everywhere.

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

    What about ML?

  • @xav_624
    @xav_624 5 місяців тому +4

    I'm a web dev with 2y of xp and I've decided to focus on rust in 2024, instead of Go. It's a great choice also for WebAssembly.

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

      Good luck with that :) Rust specifically makes a lot annoying trade offs to address a set of problems that don’t even exist in wasm deployments.
      That would be like using Angularjs to build a simple static webpage.
      Don’t get me wrong- still worth learning up to a point, but try not to box yourself into a corner with it too hard.

  • @abhishekdas8665
    @abhishekdas8665 День тому

    Zig will find use in Game Dev industry

  • @Beryesa.
    @Beryesa. 5 місяців тому +4

    5:45 Can you make a video on using rust libraries from C code or other languages if that works well?
    Using bindings to established C libraries is fine, but what about making new dependable libraries in rust that works in other languages like how C gets everywhere? That'd be interesting (in terms of making lower level open source libraries)

    • @jazzycoder
      @jazzycoder 4 місяці тому +7

      Why? Just use battle tested C libs... why would you want to use a Rust library built by a Javascript frontend developer that knows nothing about system programming lol

    • @Beryesa.
      @Beryesa. 4 місяці тому

      @@jazzycoder What? No, nothing to do with frontend devs, I just wonder if we could have nice bindings from a low level rust project into C codebases or do we have to write anything remotely reusable in C? Hint: linux DEs, wayland, shells...

    • @jazzycoder
      @jazzycoder 4 місяці тому +7

      @@Beryesa. What i mean is that 99% of Rust developers are frontend Javascript people that know nothing about system programming... why would you want to use anything they write? Best off sticking to very experience C / C++ engineered libraries.

  • @jkjoker777
    @jkjoker777 4 місяці тому +1

    “major breaking changes in a backwards compatible way” …

  • @soubinan
    @soubinan 4 місяці тому +1

    I will tend to use Zig each time I will be attempted to use Rust ... (for me, it is like GO++. And it is way enough)
    Otherwise, Go

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

      simplicity can't be beaten

  • @user-hn1cy5ee5l
    @user-hn1cy5ee5l 5 місяців тому +5

    I would suggest to hold off using rust for web development, until rust has django replacement. For business it's important to have short TTM (time to market) and rust isn't a good choice for that. I would consider python, django, django-oscar applications because for business it's better to have more features fast than only 1 fast endpoint

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

      With that logic java, c# would be an instant red flag. I think it comes more to the background/workplace you are working in more then a language issue.
      I see rust more used for example in companies that are like 50+ (non devs included) rather then small startup teams that requires indeed to prototype fast their ideas.

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

      @@lufenmartofilia5804 the ecosystem and DX for web dev in Rust is horrible to say at least, ive been there it was miserable, its the immaturity of the ecosystem the problem rather than the language itself, and ive inddeed worked in rust in a startup where most big companies here (EU)its basically 99% java with spring

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

    6:00 cross compilation to targets with old versions of libc.

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

    what about default arguments ? it's a deal breaker for me

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

      Can be emulated by Default trait.

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

      yes, but then you have to give Default::default() for each argument, or having them in a structure... again, it's really annoying@@clementdato6328

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

    im sick of rust tbh, going back to go.

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

    Дякую Богдане, чудове відео!

  • @kira.herself
    @kira.herself 5 місяців тому +5

    Zig is like an alternative to C where Rust is the alternative to C++, at least I hear that a lot

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

      you are just repeating cliches, zig "generics" for example? :) you can use zig in oop way of course, and simplier

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

    Rust is a must.

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

      The name is the Rustagen.😉

  • @dominikskeries
    @dominikskeries 4 місяці тому +1

    the main reason to learn go is the rust foundation

  • @Alex-bv5se
    @Alex-bv5se 2 місяці тому

    Showing the render of a gas powered car when you talk about electric one? ..upsy ^^

  • @harishreddy3310
    @harishreddy3310 5 місяців тому +6

    Debated between rust and zig, going with zig, I would mostly give up rust before getting proficient with it.

  • @yuridelossantos569
    @yuridelossantos569 5 місяців тому +4

    you can learn any programming as long as you're happy with it.

  • @AD-nm7ne
    @AD-nm7ne 4 місяці тому

    Indeed, Rust is a solid language, but it doesn't absolutely replace C/C++. The reality is that there is no clear successor to C/C++ yet. While C/C++ may eventually be replaced, it would likely require a new language with a simple yet immensely powerful paradigm to emerge and lead the way.