I think one of the more complex part of rust is async rust, especially when you need to go beneath the surface. So I’m always happy when I find good articles trying to clarify what is going on behind the scenes.

  • sbv
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    The hardest part (for me) is dealing with the type requirements for the handlers. 99% of the time a simple await is enough, but when it isn’t, I feel like I need to go spelunking.

    • Max-P@lemmy.max-p.me
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Especially dealing with those pinned structs for the state. I get why it’s needed because it’s on the stack somewhere but it sure makes it hard to work with without using pin_project or pin_project_lite.

    • philm@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Yeah I hope that will improve over time (maybe with the necessary ergonomic changes for async traits and higher kinded types). But I feel this is just a matter of time and will likely be much better after the next Rust edition