Blinking an LED: Embedded Rust ecosystem explored

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 มิ.ย. 2024
  • Today we find several ways to blink an LED, and explore the various layers of abstraction within the embedded Rust ecosystem.
    Chapters:
    0:00 Intro
    0:36 Peripheral Control
    3:47 Unsafe Rust
    6:13 Peripheral Access Crate
    8:09 Hardware Abstraction Layer
    10:56 Some(Rust)
    14:00 Board Support Package
    17:03 The Rusty.. Kit?
    References:
    • Embedded Rust setup ex...
    @letsgetrusty • The magic of Rust's ty...
    "The Book" | doc.rust-lang.org/book/index....
    Special thanks to Patreon supporters!
    - David King
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 123

  • @chrisgriff1512
    @chrisgriff1512 หลายเดือนก่อน +72

    As a professional Embedded Firmware Engineer, I would have killed to have this guy teach me when I started out.

  • @MrMillyBob
    @MrMillyBob หลายเดือนก่อน +78

    Do I know rust? No
    Do I program embedded? No
    Did I throughly enjoy the video anywas? Absolutely!

  • @therealjpster
    @therealjpster หลายเดือนก่อน +28

    Long time Rust Embedded Working Group member and full-time Rust and Embedded Rust trainer here.
    This was so good. 10/10, no notes.

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Thanks!! 🙏

  • @radar1437
    @radar1437 หลายเดือนก่อน +47

    the best video i see so far explains layers in embbeded WITH EXAMPLES , keep the great work , the video productions is very good . expect tutorials soon .❤❤

  • @jakubdavid2715
    @jakubdavid2715 หลายเดือนก่อน +12

    The real strength of Rust is the awesome content crated by people like this guy.
    This is essentialy a dramatization of a Rust book, one place with a comprehensive domain specific content.
    I love it.

  • @JulianBolivarGaleno74
    @JulianBolivarGaleno74 หลายเดือนก่อน +6

    Really Impressive, I didn't have idea that Embedded Rust was on so elaborated state yet and exist support crates for different micros and also commercial boards. I was thinking that on Embedded Rust everything will be need to be did at "bare metal" level. Thanks so much for taking the time to made this videos!

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Thanks Julian!

  • @weiSane
    @weiSane 25 วันที่ผ่านมา +3

    The production quality and the simple way you teach and explain things makes it such a great experience to watch and learn from your videos. This is too good 👌

  • @TheEvertw
    @TheEvertw 23 วันที่ผ่านมา +1

    This is a masterful video, HIGHLY recommended if you want to start with embedded Rust.

  • @AerialWaviator
    @AerialWaviator หลายเดือนก่อน +2

    A very friendly, well explained intro to Rust on embedded systems. The algorithm recommended video, so took a peak with a bit curiosity, now wanting to learn more.

  • @kentbowling7513
    @kentbowling7513 หลายเดือนก่อน +12

    Great video, and cleared up some of the acronym salad I see I out there. Please keep it up.

  • @cqubemc4169
    @cqubemc4169 หลายเดือนก่อน +9

    Really great Video! I would love to see a video from you about embassy-rs and async embedded rust and where it fits into the whole embedded rust ecosystem.

    • @therustybits
      @therustybits  หลายเดือนก่อน +11

      Embassy/async videos coming…

    • @yondaime500
      @yondaime500 หลายเดือนก่อน +1

      Speaking of which, the embassy docs have an example that is the same idea as this video, called layer-by-layer.

  • @dennisdecoene
    @dennisdecoene หลายเดือนก่อน +3

    Third video and 13k subs. I think you hit the motherlode. Well done. Thank you for this content, hope you can keep going!

  • @yperboreus
    @yperboreus 27 วันที่ผ่านมา +1

    Thanks for the vids so far, here’s to getting a lot more people into embedded!

  • @rammrras9683
    @rammrras9683 5 วันที่ผ่านมา

    You found too many ways of blinking an LED and I found a great channel to follow!

  • @zactron1997
    @zactron1997 หลายเดือนก่อน +4

    Excellent explanation. I like the focus on why these layers of abstraction exist, and how Rust lets you traverse this whole tower of abstractions as you please.

  • @jakobgegeniger6793
    @jakobgegeniger6793 3 วันที่ผ่านมา

    Great Introduction, I followed your guide and the setup was a piece of cake.
    I would love to learn from you, how to structure a bigger embedded project.
    Hopefully some with unit tests, that could also run partly on the Host system.

  • @1____-____1
    @1____-____1 หลายเดือนก่อน

    Don't know if you know or like it, but you're a natural great teacher. You should cover more rust topics with a real-world example. Just like the blinky light.

  • @fdm-monster
    @fdm-monster หลายเดือนก่อน

    I recommend people to take a look at Embassy. The concept in this video and the previous ones is great, but it is also very complicated. Just my 2 cents

  • @juanbeliz6296
    @juanbeliz6296 หลายเดือนก่อน +5

    Cristal clear. Superb teacher...Thx for this serie of videos about embeded rust. Kudos

  • @FedynaPavlo
    @FedynaPavlo หลายเดือนก่อน

    I guess my biggest problem with your videos is that they come out not that often. Otherwise, the best embedded tutorials so far!

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      This one was supposed to come out several weeks ago, but travel and sickness pushed it back... on the upside, the delay allowed me to catch a fairly major update to the `nrf-hal` crates, which if missed would have rendered the example from the HAL chapter inoperable when run under the latest version. So there is a silver-lining to being late I guess 😂

  • @tiagocerqueira9459
    @tiagocerqueira9459 หลายเดือนก่อน +4

    Really good video! I think you're the first one on YT exploring this space of Rust and you'll be helping a lot of people get started. Keep it up! I hope to see some tutorials on using I2C and SPI interfaces :)

  • @Onyx-it8gk
    @Onyx-it8gk 27 วันที่ผ่านมา

    This is so cool!!! I just ordered my microbit. I'm sure you're busy, but hopefully you'll keep making these videos.

  • @CanadaElon
    @CanadaElon หลายเดือนก่อน

    He is definitely a team leader ❤

  • @nilton61
    @nilton61 หลายเดือนก่อน +1

    Maybe this is a tangent. But back in the days i developed some, lets call them exotic, i/o techniques for coping with limitations. For example using analog multiplexers to read a whole matrix keyboard with just a few pins or reading both channels of an encoder and using them as a 2bit value to index into an array to detect state changes. Without doing soma analysing it feels a bit hard to implement these with HAL or BSP.
    Great video, exact the right level of detail and great pace and well scripted. Thank you

  • @Jon4as
    @Jon4as หลายเดือนก่อน +1

    Very nice video!
    But waiting for the next one will be hard!

  • @AndyDuplain
    @AndyDuplain วันที่ผ่านมา

    Fantastic information! Thank you!

  • @kv7622
    @kv7622 หลายเดือนก่อน

    this reminds me of a Friends episode (I know) "He uh, forgets to umm… Oh-oh he always, he always umm-Oh, who am I kidding! He’s the best roommate ever! (Hugs Chandler.)" The best Embedded Rust series ever! Keep up the great work.

  • @user-gp7sn4fh9t
    @user-gp7sn4fh9t วันที่ผ่านมา

    I can't wait for the next tutorial, the are so great!

  • @huxaifaahmed2021
    @huxaifaahmed2021 หลายเดือนก่อน +3

    Finally this video pop out🎉🎉.

  • @jackkendall6420
    @jackkendall6420 หลายเดือนก่อน +1

    Pro content, respect.

  • @slash.9882
    @slash.9882 หลายเดือนก่อน +1

    great video, glad to be watching part 2

  • @rick_er2481
    @rick_er2481 หลายเดือนก่อน

    Thank you!! Awesome stuff

  • @alexs6986
    @alexs6986 หลายเดือนก่อน +2

    This is just phenomenal content

  • @Saturate0806
    @Saturate0806 หลายเดือนก่อน

    the into got me hooked

  • @ybb_
    @ybb_ หลายเดือนก่อน

    These vids are awesome, please do continue!

  • @mannycalavera121
    @mannycalavera121 หลายเดือนก่อน

    Superb videos. Clear, concise, beautiful.

  • @peterklemenc6194
    @peterklemenc6194 หลายเดือนก่อน

    Fascinating and educational, thank you!

  • @nicholasmascioni3333
    @nicholasmascioni3333 หลายเดือนก่อน +1

    Really high quality video, great job!

  • @j-p-d-e-v
    @j-p-d-e-v หลายเดือนก่อน

    I started studying embedded rust last saturday and did this blinky exercise. Rooting for more of your videos in the future. Great content!.

  • @user-ml5em9eo2e
    @user-ml5em9eo2e หลายเดือนก่อน

    Great, This is way I'm at, looking forwards for the next video. I'm actually really eager to your videos as they will be my supporting material to try and persuade colleagues to try rust in their projects. thanks

  • @neekonsaadat2532
    @neekonsaadat2532 หลายเดือนก่อน

    Fantastic video! Great job covering the process of finding the information you need and implementing an idea start to finish. This series is going to become a staple for getting started with embedded rust, and even rust alone for some!

  • @sluagh5534
    @sluagh5534 หลายเดือนก่อน

    Loving your channel, great video!

  • @Ramiprops
    @Ramiprops หลายเดือนก่อน

    Another video, another banger. Keep up the good work!

  • @miguelfrutos8738
    @miguelfrutos8738 หลายเดือนก่อน

    Great video!! Thanks for sharing

  • @justinw6978
    @justinw6978 หลายเดือนก่อน

    Thank you for another excellent video! :D

  • @PauloLuisFranchiniCasaretto
    @PauloLuisFranchiniCasaretto 23 วันที่ผ่านมา

    Great content, and great production. The music is such a vibe

  • @unaimillian
    @unaimillian หลายเดือนก่อน

    Very informative videos! Thank you a lot for the effort ❤
    I'm new to the embedded world so clarifications on each step are very useful. Also cool to know how to approach the same problem with a different layers of abstraction.

  • @luqasc1
    @luqasc1 หลายเดือนก่อน

    You make great content!!
    Keep it coming 🔥🔥🔥

  • @skippy_oz
    @skippy_oz หลายเดือนก่อน

    Damn, these are good. Love the tone, love the rythm. Keep up the great work!

  • @mikkelens
    @mikkelens หลายเดือนก่อน

    I wish I had this exact video before I started working with my microprocessors HAL a couple weeks ago, and before I tried working with my 8x8 multiplexed LED just last week. Excited for more videos!

  • @drew-koning
    @drew-koning หลายเดือนก่อน

    Another great video!

  • @pedromota7506
    @pedromota7506 หลายเดือนก่อน

    Gotta love this guy ❤

  • @VladimirDjokic
    @VladimirDjokic หลายเดือนก่อน

    You were born to be a teacher!! Great Video!

  • @thebigswiss1239
    @thebigswiss1239 หลายเดือนก่อน

    Thank you very much!!!!!

  • @lefran229
    @lefran229 หลายเดือนก่อน

    Keep up the great work!!

  • @panagiotischagias4119
    @panagiotischagias4119 27 วันที่ผ่านมา

    awesome!

  • @hemlobrypto
    @hemlobrypto หลายเดือนก่อน

    man i love this channel

  • @FuadIsmail
    @FuadIsmail หลายเดือนก่อน +1

    I knew this one's coming after the last one 😁 Already pre-liked the video! ❤

  • @reinhardtvonbrandis3760
    @reinhardtvonbrandis3760 หลายเดือนก่อน

    Awesome video!

  • @tomekmgr
    @tomekmgr หลายเดือนก่อน

    Fantastic!, thanks ❤

  • @jrmoulton
    @jrmoulton หลายเดือนก่อน

    So good!!

  • @yad-thaddag
    @yad-thaddag หลายเดือนก่อน

    I don't know Rust and I don't write embedded software, but this video is amazing!

  • @andrewrussellmalcolm
    @andrewrussellmalcolm หลายเดือนก่อน

    Great video. I'm off to try some of these approaches on my stm32 projects😊

  • @henrispriet9812
    @henrispriet9812 หลายเดือนก่อน

    amazing video!

  • @jesusvelasco4893
    @jesusvelasco4893 21 วันที่ผ่านมา

    Amazing

  • @fluffy_tail4365
    @fluffy_tail4365 หลายเดือนก่อน

    Thanks for this overview, coming from C embed it can be a bit confusing to find your bearings in the rust ecosystem. The ability to possibly write your own BSP for custom boards to properly handle complex peripherals (like IC2 screens or memory) sounds great

  • @PietPanzer
    @PietPanzer หลายเดือนก่อน

    Love ur content ❤

  • @skinoma
    @skinoma หลายเดือนก่อน

    Finally another video :))

  • @1vader
    @1vader หลายเดือนก่อน

    5:25 btw, there's also a write_volatile method on pointers, so you could have written this as GPIO0_PINCNF21_ROW1_ADDR.write_volatile(PINCNF_DRIVE_LED). It saves an import and reads slightly nicer imo.

  • @yondaime500
    @yondaime500 หลายเดือนก่อน +1

    11:30 this is called the TypeState pattern, by the way.

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Typestate FTW! 🙌

  • @TheOmfg02
    @TheOmfg02 หลายเดือนก่อน

    Man, you’re gonna get big :)

  • @johnwu5908
    @johnwu5908 หลายเดือนก่อน

    Strong Opening

  • @lohikarhu734
    @lohikarhu734 หลายเดือนก่อน

    Hi...i'm watching on a tablet, even 8.3" one (i'm stuck in bed with a neuro problem) , so the monitor characters are really hard to see easily, and the type-ahead also causes my little mind some confusion... my first MCU project was on an XC6803, using lined computer paper, a code book, a pencil, and a soft eraser ... my last big job was developing ICs for mobile applications, the kind where it's 200x10^6 per year, so it's fun to get closer to bare metal, even if we have some "corrosion-resistant" PAC in between!
    Very nice videos, but i need to rewind often.

  • @krauterbaguette3645
    @krauterbaguette3645 หลายเดือนก่อน

    love when you drop a new video 😂

  • @descriptionsuchandsuch4709
    @descriptionsuchandsuch4709 หลายเดือนก่อน

    Such a great video! Your videos are truly the best ones I've seen regarding embedded rust. The others were always skipping some steps and left a lot of ambiguity.
    If you are ever searching for ideas to make a video out of: I'd love to see one that ports one little program to multiple different microcontrollers / boards to show the steps that need to be changed.
    Or a video about using SPI to drive a simple peripheral - for example an 8x8 LED-Matrix. I tried the latter, but failed due to the MAX7219-crate potentially having some bugs.
    Please continue to make these great, detailed videos. Tell us if you're in need of patreon subscriptions :-D

  • @caleblaws7722
    @caleblaws7722 หลายเดือนก่อน

    I've been starting my embedded (at least non Arduino IDE) journey with rust recently and decided to target the esp32 with std. I think in downloading the esp32 crates and reading through the basic tutorials to get it compiled I missed some of the underlining info this video had.

  • @arnetriesyoutube
    @arnetriesyoutube 22 วันที่ผ่านมา

    I really loved this video and I hope to see more from you soon :)
    One question: What is your workflow with music? Do you write it yourself or is there some nice software you use? Is it stock music that is just timed really well?
    Thanks!

    • @therustybits
      @therustybits  22 วันที่ผ่านมา

      All the music is from Epidemic Sound, for now at least.. I think I'm burning through some of their best content at an alarming rate 😅 I try to find songs that fit the mood of the chapter or just sound cool & help carry the story forward, and try not to reuse tracks between videos. Editing is done in Final Cut Pro. We'll see how long I can continue making videos this way, but for now I'm really enjoying how they turn out 😀

  • @edgeeffect
    @edgeeffect หลายเดือนก่อน

    Very very good breakdown of the various layers of abstraction in embedded Rust... "oxidation forms on the metal"... NICE!
    My main take away from this is that the nRF52833 is quite a nice chip... sounds loads less over-complicated than the STM32s

    • @ekon01cz
      @ekon01cz หลายเดือนก่อน

      STM32 has one of the best documentation out there. What do u mean over-complicated? Setting output pin is about setting THREE registers.

  • @BensProgrammingLab
    @BensProgrammingLab หลายเดือนก่อน

    Hey, I really love your videos! Thanks for the videos! I wanted to ask if you could at some point also cover embedded Linux with rust?

    • @therustybits
      @therustybits  หลายเดือนก่อน

      Possibly! Must admit that is not my wheelhouse: running on embedded Linux is probably going to more closely resemble a Rust program developed for your host machine (using `std`) than something that is highly resource-constrained like an MCU (using `no-std`). Would be interesting to investigate eventually though...

  • @chari_md2
    @chari_md2 7 วันที่ผ่านมา

    what are you using to edit your videos? great work not only on the embedded side but also on the editing wow

    • @therustybits
      @therustybits  7 วันที่ผ่านมา

      Thanks! Currently using Final Cut Pro for video editing.

  • @Earth_Rim_Roamer
    @Earth_Rim_Roamer หลายเดือนก่อน

    lets do Zig next

  • @eliwhalen604
    @eliwhalen604 หลายเดือนก่อน +1

    Curious what the name of the book is on the table in the background haha

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Slowly making my way through “The Linux Programming Interface”…

  • @johncoleman5666
    @johncoleman5666 27 วันที่ผ่านมา

    May be a question showing my ignorance with Rust and Microcontrollers but, if we have 1 pin for 25 leds, is it still possible to light them all at the same time? Not just to the naked eye, but in real time as well?

    • @therustybits
      @therustybits  27 วันที่ผ่านมา +1

      Generally speaking, if you want to independently control N LEDs, you’ll need N pins to control them, assuming you’re not using dedicated external hardware that is effectively doing this for you. In the case of the microbit, we only light up one row or 5 LEDs at a time, though we do use all 10 pins to do this: the row pin we are interested in is high (the others must be all low), then each column pin is either high (no voltage difference across LED, is off) or low (voltage difference across LED, is on).
      If you just want to light up all N LEDs at the same time and don’t need to individually control them, you can wire all their cathodes to ground (through resistors) and all their anodes to one pin, assuming it can handle the current requirements without dropping too much voltage. ⚡️🚨

  • @Kfoo-dj4md
    @Kfoo-dj4md หลายเดือนก่อน

    Could you please explain how can I change the state of an output pin from 2 different places in the code? Since it takes ownership of it

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      For a system that isn't running other tasks (or trying to drive the output pin via interrupt), you could pass a mutable reference to the pin to a function, which could then set its output.
      Something like:
      `fn set_output(pin: &mut impl OutputPin, is_on: bool) { pin.set_state(PinState::from(is_on)).unwrap();
      }`
      Then to call it:
      `set_output(&mut row1, is_on);`

  • @user-zj8nj3qz2s
    @user-zj8nj3qz2s หลายเดือนก่อน

    I have a question about the unsafe rust version.
    Why did you write 1

    • @therustybits
      @therustybits  หลายเดือนก่อน

      Something I didn't mention (but probably should have) is that all of the pins default at reset to inputs, with a disconnected input buffer: they are basically floating, neither high nor low. In order for current to flow through the LED, it needs to see a high voltage on its anode side (row 1) and a low voltage on its cathode side (column 1). So we need to set both pins 21 and 28 as outputs. Only setting row 1 as an output and driving it high (3.3V) is not enough, as the circuit is left open without also grounding column 1 (0V). Hope that made sense!

    • @user-zj8nj3qz2s
      @user-zj8nj3qz2s หลายเดือนก่อน

      @@therustybits I see so you set 28 to an output with setting 0x770 to 1 to avoid it being an input. So all in all both pins need to be outputs but we only toggle 21 high/low.

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Yep! The line where we toggle the state of row 1/pin 21 is also setting all the other output pins low (0), which in this example is just column 1/pin 28.

    • @user-zj8nj3qz2s
      @user-zj8nj3qz2s หลายเดือนก่อน

      @@therustybits Thanks for clearing things up! Keep up the great content btw!

  • @muxweb5736
    @muxweb5736 หลายเดือนก่อน

    Nice video thank you sir , I'm an embedded systems engineering student , I work with C it's straightforward for me , I didn't work with Rust before ...
    I don't work with HALs , I do the work from register level , am I just wasting my time ?

    • @ekon01cz
      @ekon01cz หลายเดือนก่อน +1

      No, you would be wasting time learning Rust. Don't worry.

    • @therustybits
      @therustybits  หลายเดือนก่อน +3

      Nice! Nothing wrong with working with registers directly (in C or Rust); the HAL is just a way to work at a higher level of abstraction. Becoming proficient in C is a great way to learn low-level systems... but eventually you may find yourself wanting some of the things Rust has to offer (memory-safety, stronger type system, modern tooling, etc).

  • @thegougler
    @thegougler หลายเดือนก่อน

    After seeing this, I am curious about the government's desire to move from C to Rust. I think it is well intentioned but knowing how underfunded/underallocated those jobs can be, I think there will be a lot of defaulting to unsafe rust when things get difficult (where the benefits of rust would be most needed).

    • @therustybits
      @therustybits  หลายเดือนก่อน +1

      Hoping that I can do my small part in providing useful/engaging educational content regarding how to do Rust "the right way"

    • @thegougler
      @thegougler หลายเดือนก่อน

      @@therustybits I think the video does a great job of that! My comment was more directed at people who think rust will be a magic fix for memory issues. It only works if people are willing to pay and wait for developers with the ability to achieve what you are showing.

  • @ChidleyITCompute-ye7hc
    @ChidleyITCompute-ye7hc 14 วันที่ผ่านมา

    I feel like I'm getting a little bit clever with every video.

  • @midnightfuture
    @midnightfuture หลายเดือนก่อน

    Bonus exercise for the class: make the “I ❤ Rust” message *scroll*! 😂🤓

  • @erewnoh
    @erewnoh หลายเดือนก่อน +2

    First

  • @lukasz_kostka
    @lukasz_kostka หลายเดือนก่อน

    Try to abstract different pins on different boards (and MCUs). Since everything is a struct field, you can't use type aliases. You are left with horrible macros hand writing them. It does satisfy borrow checker, however reality brutally proves this approach horrible.

    • @haydenridd
      @haydenridd หลายเดือนก่อน

      What would your alternate approach be?

    • @lukasz_kostka
      @lukasz_kostka หลายเดือนก่อน

      @@haydenridd Type aliases. for example.

  • @armincal9834
    @armincal9834 หลายเดือนก่อน +1

    If safety is the main reason to use Rust instead of C, and you have to disable Rust's safety checks even for a program as basic as toggling an LED then why not just use C for embedded software and leave Rust for user space applications and embedded linux?

    • @PietPanzer
      @PietPanzer หลายเดือนก่อน +7

      The unsafe keyword does not mean that you are doing something bad. It just means that you are leaving the safe path of software development defined by Rust and now have to make sure yourself that the specific part of the Code in the unsafe block does not contain any security gaps and does exactly what it is supposed to do.
      While in C you always have to make sure that you write safe code, in Rust you only have to do so in the unsafe block. That doesn't mean it's a bad thing. At that moment, Rust gives you full control and responsibility over your implementation.

    • @midnightfuture
      @midnightfuture หลายเดือนก่อน +3

      Because what is “unsafe” today can be made safe tomorrow - for instance by implementing the equivalent of placement new for system memory on this embedded system, after which you can reference the memory address. Unsafe allows you to scope the exception areas of evolving risk, as @PietPanzer said, but also remove it and increase safety guarantees with time.
      And that’s pretty much exactly what the PAC does here.

    • @zactron1997
      @zactron1997 หลายเดือนก่อน +2

      Unsafe doesn't disable the safety checks, just like the existence of void doesn't disable C's type system. The idea is to create isolated units of unsafety via the unsafe keyword, keeping the rest of your project safe. This is a massive win for safety and performance, since you can create high performance code without any barriers when you need it, and safely abstract it to allow the rest of your team to consume your work without needing to first read all the documentation you probably haven't written yet.
      Also, I don't think safety actually is the main reason to use Rust. Memory safety allows library authors to create far more complex libraries whilst knowing that they (and other libraries) aren't interfering with each other inadvertently. Rust has some of the best libraries in the world already, and it's only a decade old. Comparing Serde to any other alternative from any other language is a joke.

    • @armincal9834
      @armincal9834 หลายเดือนก่อน +2

      Thank you for your replies. Does anything stop C developers from doing the same thing? Like mark certain parts of their code as "unsafe" using comments, for example , and come back to it later and "make it safe"? Or does unsafe do way more than just marking a part of the source code?

    • @zactron1997
      @zactron1997 หลายเดือนก่อน

      @@armincal9834 It's more than a marker, it also unlocks functionality. You are unable to dereference a raw pointer in safe Rust, it's a compiler error. The only way to dereference a raw pointer is inside an unsafe block. This means that in normal code, you know nobody is working with raw pointers.

  • @ekon01cz
    @ekon01cz หลายเดือนก่อน

    Why is this so much more complicated and so hard to read? I don't see why would anyone choose Rust over C/C++ and CMSIS/HAL. All I can hear is memory safety gibberish from Rust fanboys, but I never had any issues while coding embedded.