Creating a Chat Server with async Rust and Tokio

Поділитися
Вставка
  • Опубліковано 1 сер 2022
  • Check out Lily Mara's book 📖 Refactoring to Rust | mng.bz/49Oj 📖 To save 40% off this book ⭐ DISCOUNT CODE: watchmara40 ⭐
    Building a chat server is a great way to learn the Tokio library because a chat server forces you to think about concurrent IO, which is the core purpose of Tokio. In this video, Lily demonstrates how you can spawn background tasks to manage independent network streams, and use tokio::select! to concurrently poll tasks which require a shared state.
    The lessons learned here can be applied generally to all kinds of asynchronous coding challenges in Rust.
    📚📚📚
    This video references the book Refactoring to Rust by Lily Mara | mng.bz/49Oj
    To save 40% off this book use discount code: watchmara40
    📚📚📚
    About the book:
    Refactoring to Rust by Lily Mara teaches you how to take advantage of Rust’s easy-to-use interoperating mechanisms. Learn practical code-mixing techniques like embedding Rust libraries into apps written in other languages. This practical guide emphasizes techniques for incrementally refactoring performance-critical code to Rust while keeping the rest of your application in its original language.
    You’ll augment programs with Rust hands-on with approachable examples like solving FizzBuzz with Rust’s pattern matching and gaining enormous runtime speedups to Python code. When you’re done, you’ll have mastered techniques for building Rust plugins you can apply to all kinds of existing software, from games to data tools.
  • Наука та технологія

КОМЕНТАРІ • 8

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

    Thanks a lot. I'm starting with Rust, but this insights of more experience devs helps a lot

  • @chandrashekharkotekar8453
    @chandrashekharkotekar8453 17 днів тому +1

    Hey, excellent explanation of the topic. I was struggling to get started with Tokio but you have solved my problem. Many thanks :)
    On a side note - can we please know which VSCode extensions you have installed on your system? I kind of liked the way VSCode was showing Rust error messages on the erronous lines.

  • @NFLStudy
    @NFLStudy Рік тому +5

    Very thorough explanation throughout. Thank you for sharing!

  • @uquantum
    @uquantum Рік тому +3

    Great codealong that illustrates how we can accomplish many useful tasks, including async, in Rust. Love how you keep the concrete goal of chat server in sight, so we don't feel too lost with Rust's famous compiler errors and carry on! Thanks!

  • @markomekjavic
    @markomekjavic Рік тому +4

    Hey, thanks for the great explanation! But may I ask, what extension are you using that you can see the compiler errors written on the side?

    • @okage_
      @okage_ 7 місяців тому +3

      error lens