{"id":720751,"date":"2021-08-31T23:39:49","date_gmt":"2021-08-31T23:39:49","guid":{"rendered":"https:\/\/www.wacoca.com\/videos\/720751\/celebrity\/"},"modified":"2021-08-31T23:39:49","modified_gmt":"2021-08-31T23:39:49","slug":"creating-a-chat-server-with-async-rust-and-tokio","status":"publish","type":"post","link":"https:\/\/www.wacoca.com\/videos\/720751\/celebrity\/","title":{"rendered":"Creating a Chat Server with async Rust and Tokio"},"content":{"rendered":"<p><iframe loading=\"lazy\"  width=\"580\" height=\"385\" src=\"https:\/\/www.youtube.com\/embed\/Iapc-qGTEBQ?modestbranding=1\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>\n<br \/>\nCheck out Lily Mara&#8217;s book \ud83d\udcd6  Refactoring to Rust |  \ud83d\udcd6 To save 40% off this book \u2b50  DISCOUNT CODE: twitmara40 \u2b50  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. 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.<\/p>\n<p>\ud83d\udcda\ud83d\udcda\ud83d\udcda<br \/>\nRefactoring to Rust |<br \/>\nTo save 40% off this book use discount code: twitmara40<br \/>\n\ud83d\udcda\ud83d\udcda\ud83d\udcda <\/p>\n<p>&#8220;Refactoring to Rust&#8221; teaches you how to take advantage of Rust\u2019s 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.<\/p>\n<p>You\u2019ll augment programs with Rust hands-on with approachable examples like solving FizzBuzz with Rust\u2019s pattern matching and gaining enormous runtime speedups to Python code. When you\u2019re done, you\u2019ll have mastered techniques for building Rust plugins you can apply to all kinds of existing software, from games to data tools.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Check out Lily Mara&#8217;s book \ud83d\udcd6 Refactoring to Rust | \ud83d\udcd6 To save 40% off this book \u2b50 DISCOUNT CODE: twitmara<\/p>\n","protected":false},"author":3,"featured_media":720752,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[21045],"tags":[592816,21047,21046,14052,592813,592814,592811,592812,592815,21657,22],"class_list":{"0":"post-720751","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-celebrity","8":"tag-async","9":"tag-celebrities","10":"tag-celebrity","11":"tag-chat","12":"tag-chat-server","13":"tag-creating","14":"tag-rust","15":"tag-rust-programming","16":"tag-server","17":"tag-tokio","18":"tag-vlog"},"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/posts\/720751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/comments?post=720751"}],"version-history":[{"count":0,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/posts\/720751\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/media\/720752"}],"wp:attachment":[{"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/media?parent=720751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/categories?post=720751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wacoca.com\/videos\/wp-json\/wp\/v2\/tags?post=720751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}