Practical Rust Web Projects: Building Cloud and Web-Based Applications
Book information
Description
Go beyond the basics of Rust and build web and serverless cloud applications. The applications explained in this practical book include web sites, RESTful APIs, a real-time web chat application, and frontend application with WebAssembly. Each chapter is organized in the following format: what this kind of application looks like; requirements for the example program; an introduction to the Rust libraries used; step-by-step implementation of the example program, including common pitfalls and best practices; and a brief comparison of libraries and frameworks in the same domain. This book will open your eyes to the world of practical web applications of Rust. After reading the book, you will be able to apply your Rust knowledge to build your own web projects. What You Will Learn Build dynamic websites with databases Build RESTful APIs Write a WebSocket server that can power a real-time chat app in Rust Discover the benefits of serverless computing using Amazon Web Service's Rust support Compile Rust to WebAssembly for high-performance frontend applications Who This Book Is For A reader with basic Rust knowledge, wishing to learn more about how to apply Rust in a real-world scenario. A developer who is evaluating the possibility to build their next project in Rust. Table of Contents About the Author About the Technical Reviewer Chapter 1: Rust in the Web World Who Is This Book For? Who Is This Book Not For? Criteria for Selecting Libraries Pure-Rust Maturity Popularity How To Use This Book Chapter Overview Source Code Chapter 2: Developing Websites What Are You Building? Hello World! Serving Static Files Rendering Dynamic Templates Using a Database Adding Cats with a Form Showing the Cat Detail Page Other Alternatives Chapter 3: REST APIs What Are You Building? Converting the Cats List to a REST API API Testing Building the Cat Detail API Input Validation Error Handling Using a ResponseBuilder or Response Using the actix web::error Helpers Using a Generic Error That Implemented the ResponseError Trait Using a Custom-Built Error Type Customize the web::Path Extractor Error Logging Enabling HTTPS Other Alternatives Chapter 4: Chatting in Real-Time with WebSocket Introduction to WebSocket What Are You Building? A WebSocket Echo Server Pushing Notifications from the Server Cleaning Up Unresponsive Clients Two-Way Chat Sending Structural JSON Data Other Alternatives Chapter 5: Going Serverless What Are You Building? Registering an AWS Account Hello World in Lambda Making a REST API with Lambda Using the Serverless Framework Building the /cats API Building the Upload API Uploading the Image Using S3 Presigned URL Adding the Frontend Other Alternatives Chapter 6: High-Performance Web Frontend Using WebAssembly What Is WebAssembly? What Are You Building? Hello WebAssembly! Setting Up the Development Environment Creating the Project Creating the Frontend Resizing Images with WebAssembly Loading an Image File Onto the Passing the Image to Wasm Writing the Whole Frontend in Rust Setting Up Yew A Hello World Example Reimplement the Image-Processing Frontend with Yew Other Alternatives Index
Similar books
Practical Rust Projects: Build Serverless, AI, Machine Learning, Embedded, Game, and Web Applications
2023 · PDF
Practical Rust Projects: Build Serverless, AI, Machine Learning, Embedded, Game, and Web Applications
2023 · EPUB
Practical Rust Web Projects: Building Cloud and Web-Based ApplicationS
2023 · PDF
Practical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications
2020 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF