Go beyond the basics and build complete applications using the Rust programming language, updated for Rust 2021 edition. The applications you'll build over the course of this book include a high-performance web client, an embedded computer (for a robot, for example), a game, a serverless web app, an
Practical Rust Web Projects: Building Cloud and Web-Based Applications
✍ Scribed by Shing Lyu
- Publisher
- Apress
- Year
- 2021
- Tongue
- English
- Leaves
- 260
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
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
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
📜 SIMILAR VOLUMES
<p><span>Go beyond the basics and build complete applications using the Rust programming language, updated for Rust 2021 edition. The applications you'll build over the course of this book include a high-performance web client, an embedded computer (for a robot, for example), a game, a serverless we
<p><span>Go beyond the basics and build complete applications using the Rust programming language, updated for Rust 2021 edition. The applications you'll build over the course of this book include a high-performance web client, an embedded computer (for a robot, for example), a game, a serverless we
<p>Eliminate the guesswork involved in writing and deploying a cloud application. This step-by-step guide uses PHP to minimize the complexity of the code and setup, but the tools and techniques can be applied on any platform using any language. Everything that you need to jumpstart your application
Eliminate the guesswork involved in writing and deploying a cloud application. This step-by-step guide uses PHP to minimize the complexity of the code and setup, but the tools and techniques can be applied on any platform using any language. Everything that you need to jumpstart your application on
<p><span>C# is undeniably one of the most versatile programming languages available to engineers today. With this comprehensive guide, you'll learn just how powerful the combination of C# and .NET can be. Author Ian Griffiths guides you through C# 10.0 and .NET 6 fundamentals and techniques for buil