How to Do Embedded Development with Rust • Steve Klabnik • GOTO 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 มิ.ย. 2024
  • This presentation was recorded at GOTO Chicago 2023. #GOTOcon #GOTOchgo
    gotochgo.com
    Steve Klabnik - Software Engineer at Oxide @steveklabnik
    ORIGINAL TALK TITLE
    I Learned Embedded Development with Rust and You Can Too
    RESOURCES
    / steveklabnik
    github.com/steveklabnik
    steveklabnik.com
    steveklabnik.com/writing
    ABSTRACT
    Are you a web developer?
    Have you ever wondered what it's like to make a microcontroller blink some LEDs?
    In this talk, Steve will show how he got started learning how to do embedded work after a decade of making web applications. In his opinion, there's more similarities than you may think! He'll cover some background information, explain some concepts you'll need to know, get a basic example going with Rust, and where to go from there. [...]
    TIMECODES
    00:00 Intro
    00:58 Personal background
    06:18 Why Rust?
    10:21 A brief detour into fashion
    20:30 Hello, World!
    26:14 Hello, World! part 2
    29:38 Important concepts
    33:45 How to learn more
    35:05 You could have invented I2C
    39:26 An aside about interrupts
    42:40 Cultural differences
    47:57 More resources
    49:58 Outro
    Download slides and read the full abstract here:
    gotochgo.com/2023/sessions/2652
    RECOMMENDED BOOKS
    Steve Klabnik & Carol Nichols • The Rust Programming Language • amzn.to/45MBJmS
    Bigg, Katz, Klabnik, Skinner • Rails 4 in Action • amzn.to/45DXG7v
    Claus Matzinger • Learn Rust Programming • amzn.to/3PeN0Fx
    Tim McNamara • Rust in Action • amzn.to/3ux2R9u
    Brenden Matthews • Code Like a Pro in Rust • amzn.to/3LFAyy9
    Prabhu Eshwarla • Rust Servers, Services & Apps • amzn.to/3yV13br
    Bastian Gruber • Rust Web Development • amzn.to/3lquaQX
    Blandy, Orendorff & Tindall • Programming Rust • amzn.to/3x7r6w6
    Ken Youens-Clark • Command-Line Rust • amzn.to/3PQZ539
    Kevin Hoffman • Programming WebAssembly with Rust • amzn.to/3x3brhe
    / gotocon
    / goto-
    / gotoconferences
    #EmbeddedRust #Rust #Rustlang #EmbeddedSystem #EmbeddedProgramming #Debugger #SystemsProgramming #I2C #ComputerScience #SteveKlabnik #Oxide #Programming #PersistentStorage #FunctionalProgramming #SoftwareEngineering #TheDevilWearsPrada
    Looking for a unique learning experience?
    Attend the next GOTO conference near you! Get your ticket at gotopia.tech
    Sign up for updates and specials at gotopia.tech/newsletter
    SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
    th-cam.com/users/GotoConf...
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    The attitudes about web programming and system programming made me think for years I didn’t like coding, when what I actually needed was to get closer to the metal and gain a deeper understanding of the theory.

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

    I've dabbled in low-level programming, but never really interfaced directly with actual hardware. This is a great starting point for me. Thanks Steve!

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

    I like the analogy, because fashion also repeats itself, people going away from RPC 20 years back, and now we are coming back to it, same with message passing

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

      I cannot agree more. Sun RPC / CORBA were dealing the same problem which - say, Protobuf - today does! 😁

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

      we are?

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

    It's pretty much the same, concepts and the challenges are very much alike. E.g. multi threading in C++ and module loading in Angular, C++ compilation and assets bundling, GDB and DevTools debugger, once you truly master one side of it the other becomes easy and accessible as well.

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

    Intro ❤

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

    I2C screams of TCP, at least in this simplified explanation. I got my start in IT provisioning IP networks and now I’m doing web development. It’s cool to see how certain concepts from one domain come into another. Thanks for this talk, definitely makes me feel like I can pick up more systems and embedded programming. 👍

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

    compiler message with suggested solution ?! ..great ! I've always thought when a compiler tell me "missing ';' or '"" etc... why don't they just ADD it (still print a warning in case it's really not what the programmer had in mind) and CONTINUE building !
    Later the programmer can see ALL the error in once pass.. even like 'accept compiler solution' to automate the trivial fix...

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

      this can be dangerous for real compiler errors since a program that doesnt compile by definition is wrong and therefor cannot be fixed without knowing the intent of the program from outside of the program itself, but… if you are using a rust code linter like clippy, where your program definitely compiles but may be improved for effiency, clarity or brevity reasons, it will give you those suggestions like a compiler would tive you warnings or errors AND you can run “clippy -fix” to make it actually apply some of these suggestions to your code and you can basically trust it did it correctly without altering any behaviour. I believe all clippy automatic fixes follow the rule of not changing program I/O behaviour at all.

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

      In this way, the clippy linter is a lot like a more powerful and/or higher concept code formatter (like rustfmt), which I think is really magical.

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

      Also note that not every clippy suggestion/warning has an automatic fix since those can be pretty complicated at times even though the issue may be obvious. For the areas it works automatically, its wonderful for cleaning up big piles of code while you rummage through it, like forking a small “old” unkept rust library for your own use or improving your own code from before the clippy lints existed/were something you used regularly (new ones are added all the time)!

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

    Master Slave are only words just like proletariat bourgeoisie

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

    19:36 totally blew my mind... because if you were to press my for my "views" on software development... it would be THAT SLIDE... WORD FOR (expletive deleted) WORD!

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

    The server/client terminology is not fitting when replacing master/slave in this case - server/client should be swapped. The controller would be the "client" and the peripheral is "serving".

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

      The "server" (microcontroller), in this paradigm, is both serving and requesting data just like a typical web server (serving data to clients, requesting data/services from dbs/apis etc). It is also running the main loop, always listening for "requests" (interrupts) and handling the execution of those events. It wouldn't be fit to call it a client.
      Instead of redefining the server, it might be helpful to think of the "clients" (peripherals) as anything that directly communicates with the server, regardless of whether it's sending or receiving information (browser, db, API, terminal, etc).

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

      Yeah which is why the struggle to keep master slave terminology. It works really intuitively unfortunately: a slave cant have 2 master, but a master can have 2 slaves.

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

    28:00 unpopular opinion: I hate this code! WoW. If you tell me this is what Rust has to offer for embedded programming I will stuck to my C lang.

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

      It's done to show you what HALs do under the hood in Rust. As you user you don't have to delve into this stuff, like you wouldn't have to delve into this with C you'd use an of the shelf HAL. Embedded programming is so much more than writing to registers.

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

    talk starts at 20:40

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

      Thanks