Build an in-memory todo app in Rust using Axum web framework

Sdílet
Vložit
  • čas přidán 19. 08. 2023
  • We will be building a to-do web application in Rust using the Axum web framework. In Rust, Axum is one of the most popular web frameworks of 2023.
    While building this rust/axum web application we will come across some Rust hurdles that we will need to tackle.
    Here is a list of some of the things we will learn in this video (while building the app):
    * Rust module system which will help us with how to structure axum rust folders
    * Why use Rust Mutex
    * Why use Rust RwLock
    * What is the difference between Rust standard Mutex/RwLock and Tokio Mutex/RwLock
    This video is belonging to a rust web development crash course: • Rust Web Development C...
    (its NOT required to see all videos, its just that somethings might not be explained, as they might have been explained earlier in the series).
    Chapter list:'
    * 00:34 - Build the Vue composable
    * 05:44 - Build the Vue view
    * 08:03 - Correct an issue from last video (where I used npm by misstake)
    * 09:24 - Intro to Rust modules
    * 13:45 - Making the state submodule
    * 20:00 - Making the routes submodule
    * 29:30 - Rust Mutex and RwLock
    * 32:00 - Axum path extractor
    * 33:01 - Making the in_memory module
    * 33:45 - Hook up routes
    As usual, here is a friend link to read the article this video is based on over at medium, for free: medium.com/@lindblomdev/pragm...
    #rustlang #webdevelopment #crashcourse #tutorial #vuejs #axum #rustprogramming #rustapi

Komentáře • 27

  • @r2_rho
    @r2_rho Před 10 měsíci +2

    Dont listen to the haters, this was excellently done. I particularly appreciate your level of detail explaining the refactor needed when incorporating Arc and Mutex, and the explanation of Tokio Mutex vs Std Mutex was super helpful.

  • @ryandsouza2962
    @ryandsouza2962 Před 7 měsíci +1

    Great vid! Axum is an amazing framework to build API's in Rust! Waiting for the Postgres vid :)

  • @ProGamerru
    @ProGamerru Před měsícem +1

    Great video. I'd like to see a video about authorization and authentication

    • @lindblomdev
      @lindblomdev  Před 8 dny +1

      Thanks. I will add users to the todo app in an upcoming video.

    • @ProGamerru
      @ProGamerru Před 8 dny +1

      ​@@lindblomdev Thank you. This is exactly what I'm designing now

  • @adrianstan2828
    @adrianstan2828 Před 10 měsíci

    Great !

    • @lindblomdev
      @lindblomdev  Před 10 měsíci

      Glad you found it interesting 🙏

  • @skaunov_code
    @skaunov_code Před 10 měsíci +1

    That's a nice one!
    I personally had two problems along.
    Couldn't get past CORS with SSH VS Code ports autoforwarding.
    And had to add `let id = state.get_id();` to `create_todo` before `.write()` and make `state` `mut`.

    • @lindblomdev
      @lindblomdev  Před 10 měsíci

      Damit! I just keep messing up 🙈 next video will not have any issues like these 🤞and i will also provide git repo link along wirh next video for people who want that.
      Thanks for adding your fix here as a comment. 👊

  • @costabasil
    @costabasil Před 10 měsíci

    Can hardly wait for the next video with Postgres!! I really appreciate the level of details and explanations for various things

    • @lindblomdev
      @lindblomdev  Před 8 dny

      I know it's late, but it's coming very very soon.

    • @costabasil
      @costabasil Před 7 dny

      @@lindblomdev It is indeed too late for me 🙂 I moved away from rust! Sorry, I found it horrible to program in, and I moved back to scala. I wanted to see what the fuss is about and I guess I know now. The emperor has no cloths.

    • @lindblomdev
      @lindblomdev  Před 7 dny

      haha :D i havent used anything that makes me question my decision to use the tech as rust. "why am i using a systems programming language to build web apis?" has come up a lot. My answer to myself every time is "skill issue". With more experience it should be smoother. With that said, i still make my living writing C# and JS/TS. As for Scala, i only looked at the play framwork a long time ago, but never actually used it, heard good things though.

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh Před 6 měsíci

    Can you do a diesel (or if there is an better ORM for rust) tutorial?

  • @s.joseph406
    @s.joseph406 Před 8 měsíci

    Hi, kindly compare actix and axum, what is the difference and which is better

    • @lindblomdev
      @lindblomdev  Před 7 dny

      i think that is for someone else to do, as i havent used actix. When i looked it, it didnt use async/await (as it wasnt in Rust stable at the time), same goes for Diesel. With that said, i think if you just look at come code examples, you can see which is more inline with how you think. And switching cost is pretty low, so just pick one and build whatever you want to build, just start and it will be fine 👊

  • @user-of6ls2ng5l
    @user-of6ls2ng5l Před 5 měsíci

    I think releasing videos like this without a link to the github = crime

    • @lindblomdev
      @lindblomdev  Před 5 měsíci

      Yes. That's why I haven't uploaded any videos as of late. Laying low, avoiding 5-0 until I get my video mirror repo up and in order. 😶‍🌫️

  • @classyboy2000
    @classyboy2000 Před 7 měsíci +3

    No setup? No GH repo link? Am I taking crazy pills? You just start the video in your project with ~dozens of files and no explanations. I must me missing something....

    • @lindblomdev
      @lindblomdev  Před 8 dny

      It's supposed to be a series. There should be a Playlist, will look over the descriptions to make sure in the coming days. Also add github links.

  • @khanra17
    @khanra17 Před 10 měsíci

    boring af

    • @lindblomdev
      @lindblomdev  Před 10 měsíci +1

      That is honest and valid feedback. Did you watch it all the way through? If not, where did you stop? Do you have an example of someone doing a similar thing, but not boring af? If so, please share, it doesn't need to be in the same topic.
      If you have trouble pasting in a link, just give the channel and video title and can find it.

    • @kolakup7672
      @kolakup7672 Před 8 měsíci +3

      @@lindblomdev No its not valid feedback. Please ignore morons. Thank you for your hard work. I wish to see content from you every day on axum. Thank you again.

    • @kolakup7672
      @kolakup7672 Před 8 měsíci

      rtard stick to the basics and go program in scratch

    • @lindblomdev
      @lindblomdev  Před 7 dny +1

      thanks for the back up 😆👊